43 lines · c
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-exception6//7//===----------------------------------------------------------------------===//8 9#ifndef LLDB_PLUGINS_PROTOCOL_MCP_TOOL_H10#define LLDB_PLUGINS_PROTOCOL_MCP_TOOL_H11 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 18namespace lldb_private::mcp {19 20class CommandTool : public lldb_protocol::mcp::Tool {21public: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 31class DebuggerListTool : public lldb_protocol::mcp::Tool {32public:33 using lldb_protocol::mcp::Tool::Tool;34 ~DebuggerListTool() = default;35 36 llvm::Expected<lldb_protocol::mcp::CallToolResult>37 Call(const lldb_protocol::mcp::ToolArguments &args) override;38};39 40} // namespace lldb_private::mcp41 42#endif43