LLDB
mainline
llvm-project
lldb
source
Plugins
Protocol
MCP
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
12
#include "
lldb/Protocol/MCP/Protocol.h
"
13
#include "
lldb/Protocol/MCP/Tool.h
"
14
#include "llvm/Support/Error.h"
15
#include "llvm/Support/JSON.h"
16
#include <optional>
17
18
namespace
lldb_private::mcp
{
19
20
class
CommandTool
:
public
lldb_protocol::mcp::Tool
{
21
public
:
22
using
lldb_protocol::mcp::Tool::Tool
;
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
Protocol.h
lldb_private::mcp::CommandTool
Definition
source/Plugins/Protocol/MCP/Tool.h:20
lldb_private::mcp::CommandTool::GetSchema
std::optional< llvm::json::Value > GetSchema() const override
Definition
Plugins/Protocol/MCP/Tool.cpp:81
lldb_private::mcp::CommandTool::Call
llvm::Expected< lldb_protocol::mcp::CallToolResult > Call(const lldb_protocol::mcp::ToolArguments &args) override
Definition
Plugins/Protocol/MCP/Tool.cpp:45
lldb_private::mcp::CommandTool::~CommandTool
~CommandTool()=default
lldb_protocol::mcp::Tool
Definition
include/lldb/Protocol/MCP/Tool.h:19
lldb_protocol::mcp::Tool::Tool
Tool(std::string name, std::string description)
Definition
Protocol/MCP/Tool.cpp:13
Tool.h
lldb_private::mcp
Definition
ProtocolServerMCP.h:19
lldb_protocol::mcp::ToolArguments
std::variant< std::monostate, llvm::json::Value > ToolArguments
Definition
Protocol.h:190
Generated on
for LLDB by
1.14.0