LLDB mainline
source/Plugins/Protocol/MCP/Tool.h
Go to the documentation of this file.
1//===- Tool.h -------------------------------------------------------------===//
2//
3// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4// See https://llvm.org/LICENSE.txt for license information.
5// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6//
7//===----------------------------------------------------------------------===//
8
9#ifndef LLDB_PLUGINS_PROTOCOL_MCP_TOOL_H
10#define LLDB_PLUGINS_PROTOCOL_MCP_TOOL_H
11
14#include "llvm/Support/Error.h"
15#include "llvm/Support/JSON.h"
16#include <optional>
17
18namespace lldb_private::mcp {
19
21public:
23 ~CommandTool() = default;
24
25 llvm::Expected<lldb_protocol::mcp::CallToolResult>
26 Call(const lldb_protocol::mcp::ToolArguments &args) override;
27
28 std::optional<llvm::json::Value> GetSchema() const override;
29};
30
31} // namespace lldb_private::mcp
32
33#endif
std::optional< llvm::json::Value > GetSchema() const override
llvm::Expected< lldb_protocol::mcp::CallToolResult > Call(const lldb_protocol::mcp::ToolArguments &args) override
Tool(std::string name, std::string description)
std::variant< std::monostate, llvm::json::Value > ToolArguments
Definition Protocol.h:190