LLDB mainline
Protocol.h File Reference
#include "llvm/Support/JSON.h"
#include <optional>
#include <string>
#include <variant>
#include <vector>

Go to the source code of this file.

Classes

struct  lldb_protocol::mcp::Request
 A request that expects a response. More...
struct  lldb_protocol::mcp::Error
struct  lldb_protocol::mcp::Response
 A response to a request, either an error or a result. More...
struct  lldb_protocol::mcp::Notification
 A notification which does not expect a response. More...
struct  lldb_protocol::mcp::Resource
 A known resource that the server is capable of reading. More...
struct  lldb_protocol::mcp::ListResourcesResult
 The server’s response to a resources/list request from the client. More...
struct  lldb_protocol::mcp::TextResourceContents
 The contents of a specific resource or sub-resource. More...
struct  lldb_protocol::mcp::ReadResourceParams
 Sent from the client to the server, to read a specific resource URI. More...
struct  lldb_protocol::mcp::ReadResourceResult
 The server's response to a resources/read request from the client. More...
struct  lldb_protocol::mcp::TextContent
 Text provided to or from an LLM. More...
struct  lldb_protocol::mcp::ToolDefinition
 Definition for a tool the client can call. More...
struct  lldb_protocol::mcp::Implementation
 Describes the name and version of an MCP implementation, with an optional title for UI representation. More...
struct  lldb_protocol::mcp::ClientCapabilities
 Capabilities a client may support. More...
struct  lldb_protocol::mcp::ServerCapabilities
 Capabilities that a server may support. More...
struct  lldb_protocol::mcp::InitializeParams
 Initialization. More...
struct  lldb_protocol::mcp::InitializeResult
 After receiving an initialize request from the client, the server sends this response. More...
struct  lldb_protocol::mcp::ListToolsResult
 The server's response to a tools/list request from the client. More...
struct  lldb_protocol::mcp::CallToolParams
 Used by the client to invoke a tool provided by the server. More...
struct  lldb_protocol::mcp::CallToolResult
 The server’s response to a tool call. More...

Namespaces

namespace  lldb_protocol
namespace  lldb_protocol::mcp

Typedefs

using lldb_protocol::mcp::Id = std::variant<int64_t, std::string>
 A Request or Response 'id'.
using lldb_protocol::mcp::Message = std::variant<Request, Response, Notification>
 A general message as defined by the JSON-RPC 2.0 spec.
using lldb_protocol::mcp::ToolArguments = std::variant<std::monostate, llvm::json::Value>
using lldb_protocol::mcp::Void = std::monostate
 Special case parameter or result that has no value.
using lldb_protocol::mcp::ContentBlock = TextContent
 Supported content types, currently only TextContent, but the spec includes additional content types.

Enumerations

enum  lldb_protocol::mcp::ErrorCode : signed {
  lldb_protocol::mcp::eErrorCodeParseError = -32700 , lldb_protocol::mcp::eErrorCodeInvalidRequest = -32600 , lldb_protocol::mcp::eErrorCodeMethodNotFound = -32601 , lldb_protocol::mcp::eErrorCodeInvalidParams = -32602 ,
  lldb_protocol::mcp::eErrorCodeInternalError = -32603
}

Functions

llvm::json::Value lldb_protocol::mcp::toJSON (const Request &)
bool lldb_protocol::mcp::fromJSON (const llvm::json::Value &, Request &, llvm::json::Path)
bool lldb_protocol::mcp::operator== (const Request &, const Request &)
llvm::json::Value lldb_protocol::mcp::toJSON (const Error &)
bool lldb_protocol::mcp::fromJSON (const llvm::json::Value &, Error &, llvm::json::Path)
bool lldb_protocol::mcp::operator== (const Error &, const Error &)
llvm::json::Value lldb_protocol::mcp::toJSON (const Response &)
bool lldb_protocol::mcp::fromJSON (const llvm::json::Value &, Response &, llvm::json::Path)
bool lldb_protocol::mcp::operator== (const Response &, const Response &)
llvm::json::Value lldb_protocol::mcp::toJSON (const Notification &)
bool lldb_protocol::mcp::fromJSON (const llvm::json::Value &, Notification &, llvm::json::Path)
bool lldb_protocol::mcp::operator== (const Notification &, const Notification &)
bool lldb_protocol::mcp::fromJSON (const llvm::json::Value &, Message &, llvm::json::Path)
llvm::json::Value lldb_protocol::mcp::toJSON (const Message &)
llvm::json::Value lldb_protocol::mcp::toJSON (const Resource &)
bool lldb_protocol::mcp::fromJSON (const llvm::json::Value &, Resource &, llvm::json::Path)
llvm::json::Value lldb_protocol::mcp::toJSON (const ListResourcesResult &)
bool lldb_protocol::mcp::fromJSON (const llvm::json::Value &, ListResourcesResult &, llvm::json::Path)
llvm::json::Value lldb_protocol::mcp::toJSON (const TextResourceContents &)
bool lldb_protocol::mcp::fromJSON (const llvm::json::Value &, TextResourceContents &, llvm::json::Path)
llvm::json::Value lldb_protocol::mcp::toJSON (const ReadResourceParams &)
bool lldb_protocol::mcp::fromJSON (const llvm::json::Value &, ReadResourceParams &, llvm::json::Path)
llvm::json::Value lldb_protocol::mcp::toJSON (const ReadResourceResult &)
bool lldb_protocol::mcp::fromJSON (const llvm::json::Value &, ReadResourceResult &, llvm::json::Path)
llvm::json::Value lldb_protocol::mcp::toJSON (const TextContent &)
bool lldb_protocol::mcp::fromJSON (const llvm::json::Value &, TextContent &, llvm::json::Path)
llvm::json::Value lldb_protocol::mcp::toJSON (const ToolDefinition &)
bool lldb_protocol::mcp::fromJSON (const llvm::json::Value &, ToolDefinition &, llvm::json::Path)
llvm::json::Value lldb_protocol::mcp::toJSON (const Implementation &)
bool lldb_protocol::mcp::fromJSON (const llvm::json::Value &, Implementation &, llvm::json::Path)
llvm::json::Value lldb_protocol::mcp::toJSON (const ClientCapabilities &)
bool lldb_protocol::mcp::fromJSON (const llvm::json::Value &, ClientCapabilities &, llvm::json::Path)
llvm::json::Value lldb_protocol::mcp::toJSON (const ServerCapabilities &)
bool lldb_protocol::mcp::fromJSON (const llvm::json::Value &, ServerCapabilities &, llvm::json::Path)
llvm::json::Value lldb_protocol::mcp::toJSON (const InitializeParams &)
bool lldb_protocol::mcp::fromJSON (const llvm::json::Value &, InitializeParams &, llvm::json::Path)
llvm::json::Value lldb_protocol::mcp::toJSON (const InitializeResult &)
bool lldb_protocol::mcp::fromJSON (const llvm::json::Value &, InitializeResult &, llvm::json::Path)
llvm::json::Value lldb_protocol::mcp::toJSON (const Void &)
bool lldb_protocol::mcp::fromJSON (const llvm::json::Value &, Void &, llvm::json::Path)
llvm::json::Value lldb_protocol::mcp::toJSON (const ListToolsResult &)
bool lldb_protocol::mcp::fromJSON (const llvm::json::Value &, ListToolsResult &, llvm::json::Path)
llvm::json::Value lldb_protocol::mcp::toJSON (const CallToolParams &)
bool lldb_protocol::mcp::fromJSON (const llvm::json::Value &, CallToolParams &, llvm::json::Path)
llvm::json::Value lldb_protocol::mcp::toJSON (const CallToolResult &)
bool lldb_protocol::mcp::fromJSON (const llvm::json::Value &, CallToolResult &, llvm::json::Path)

Variables

static llvm::StringLiteral lldb_protocol::mcp::kProtocolVersion = "2024-11-05"