blob: 8450ce3d6c2ddfba3fa9afc5903c0cdff58c1a75 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
|
//===- Tool.h -------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//
#ifndef LLDB_PLUGINS_PROTOCOL_MCP_TOOL_H
#define LLDB_PLUGINS_PROTOCOL_MCP_TOOL_H
#include "lldb/Protocol/MCP/Protocol.h"
#include "lldb/Protocol/MCP/Tool.h"
#include "llvm/Support/Error.h"
#include "llvm/Support/JSON.h"
#include <optional>
namespace lldb_private::mcp {
class CommandTool : public lldb_protocol::mcp::Tool {
public:
using lldb_protocol::mcp::Tool::Tool;
~CommandTool() = default;
llvm::Expected<lldb_protocol::mcp::CallToolResult>
Call(const lldb_protocol::mcp::ToolArguments &args) override;
std::optional<llvm::json::Value> GetSchema() const override;
};
class DebuggerListTool : public lldb_protocol::mcp::Tool {
public:
using lldb_protocol::mcp::Tool::Tool;
~DebuggerListTool() = default;
llvm::Expected<lldb_protocol::mcp::CallToolResult>
Call(const lldb_protocol::mcp::ToolArguments &args) override;
};
} // namespace lldb_private::mcp
#endif
|