|
|
| mcp::protocol::CXXMCP_PROTOCOL_STRING_CONSTANT (JsonRpcVersion, "2.0") |
| | JSON-RPC protocol version string placed in message envelopes.
|
| |
|
| mcp::protocol::CXXMCP_PROTOCOL_STRING_CONSTANT (McpProtocolVersion2025_11_25, "2025-11-25") |
| |
|
| mcp::protocol::CXXMCP_PROTOCOL_STRING_CONSTANT (McpProtocolVersion2025_06_18, "2025-06-18") |
| |
|
| mcp::protocol::CXXMCP_PROTOCOL_STRING_CONSTANT (McpProtocolVersion2025_03_26, "2025-03-26") |
| |
|
| mcp::protocol::CXXMCP_PROTOCOL_STRING_CONSTANT (McpProtocolVersion2024_11_05, "2024-11-05") |
| |
|
bool | mcp::protocol::is_supported_protocol_version (std::string_view version) noexcept |
| | Returns true when a peer protocol version is supported.
|
| |
|
std::optional< std::string_view > | mcp::protocol::negotiate_protocol_version (std::string_view requested) noexcept |
| | Returns the peer-requested version when known.
|
| |
|
| mcp::protocol::CXXMCP_PROTOCOL_STRING_CONSTANT (InitializeMethod, "initialize") |
| | initialize request method for lifecycle negotiation.
|
| |
|
| mcp::protocol::CXXMCP_PROTOCOL_STRING_CONSTANT (InitializedMethod, "notifications/initialized") |
| | Notification sent after a successful initialize response.
|
| |
|
| mcp::protocol::CXXMCP_PROTOCOL_STRING_CONSTANT (PingMethod, "ping") |
| | Lightweight liveness request.
|
| |
|
| mcp::protocol::CXXMCP_PROTOCOL_STRING_CONSTANT (ServerDiscoverMethod, "server/discover") |
| | Stateless server discovery (SEP-2575).
|
| |
|
| mcp::protocol::CXXMCP_PROTOCOL_STRING_CONSTANT (PromptsListMethod, "prompts/list") |
| | Lists available prompts.
|
| |
|
| mcp::protocol::CXXMCP_PROTOCOL_STRING_CONSTANT (PromptsGetMethod, "prompts/get") |
| | Retrieves a prompt by name and arguments.
|
| |
|
| mcp::protocol::CXXMCP_PROTOCOL_STRING_CONSTANT (ResourcesListMethod, "resources/list") |
| | Lists concrete resources.
|
| |
|
| mcp::protocol::CXXMCP_PROTOCOL_STRING_CONSTANT (ResourcesReadMethod, "resources/read") |
| | Reads resource contents by URI.
|
| |
|
| mcp::protocol::CXXMCP_PROTOCOL_STRING_CONSTANT (ResourcesTemplatesListMethod, "resources/templates/list") |
| | Lists URI templates that can produce resources.
|
| |
|
| mcp::protocol::CXXMCP_PROTOCOL_STRING_CONSTANT (ResourcesSubscribeMethod, "resources/subscribe") |
| | Subscribes to updates for a resource URI.
|
| |
|
| mcp::protocol::CXXMCP_PROTOCOL_STRING_CONSTANT (ResourcesUnsubscribeMethod, "resources/unsubscribe") |
| | Removes a resource subscription.
|
| |
|
| mcp::protocol::CXXMCP_PROTOCOL_STRING_CONSTANT (ToolsListMethod, "tools/list") |
| | Lists callable tools.
|
| |
|
| mcp::protocol::CXXMCP_PROTOCOL_STRING_CONSTANT (ToolsGetMethod, "tools/get") |
| | Retrieves a tool definition.
|
| |
|
| mcp::protocol::CXXMCP_PROTOCOL_STRING_CONSTANT (ToolsCallMethod, "tools/call") |
| | Calls a named tool with JSON arguments.
|
| |
|
| mcp::protocol::CXXMCP_PROTOCOL_STRING_CONSTANT (CompletionCompleteMethod, "completion/complete") |
| | Completes a prompt or resource-template argument value.
|
| |
|
| mcp::protocol::CXXMCP_PROTOCOL_STRING_CONSTANT (LoggingSetLevelMethod, "logging/setLevel") |
| | Updates the minimum logging level the peer should emit.
|
| |
|
| mcp::protocol::CXXMCP_PROTOCOL_STRING_CONSTANT (SamplingCreateMessageMethod, "sampling/createMessage") |
| | Requests client-side model sampling.
|
| |
|
| mcp::protocol::CXXMCP_PROTOCOL_STRING_CONSTANT (ElicitationCreateMethod, "elicitation/create") |
| | Requests user input through MCP elicitation.
|
| |
|
| mcp::protocol::CXXMCP_PROTOCOL_STRING_CONSTANT (ElicitationCompleteNotificationMethod, "notifications/elicitation/complete") |
| | Notification that a URL-based elicitation interaction completed.
|
| |
|
| mcp::protocol::CXXMCP_PROTOCOL_STRING_CONSTANT (TasksListMethod, "tasks/list") |
| | Lists asynchronous tasks known to the peer.
|
| |
|
| mcp::protocol::CXXMCP_PROTOCOL_STRING_CONSTANT (TasksGetMethod, "tasks/get") |
| | Retrieves a task by id.
|
| |
|
| mcp::protocol::CXXMCP_PROTOCOL_STRING_CONSTANT (TasksCancelMethod, "tasks/cancel") |
| | Requests cancellation of a task.
|
| |
|
| mcp::protocol::CXXMCP_PROTOCOL_STRING_CONSTANT (TasksResultMethod, "tasks/result") |
| | Retrieves the result associated with a completed task.
|
| |
|
| mcp::protocol::CXXMCP_PROTOCOL_STRING_CONSTANT (TasksCreateMethod, "tasks/create") |
| | Server-to-client request to create a new task.
|
| |
|
| mcp::protocol::CXXMCP_PROTOCOL_STRING_CONSTANT (TasksStatusNotificationMethod, "notifications/tasks/status") |
| | Notification carrying task status updates.
|
| |
|
| mcp::protocol::CXXMCP_PROTOCOL_STRING_CONSTANT (RootsListMethod, "roots/list") |
| | Lists client roots available to the server.
|
| |
|
| mcp::protocol::CXXMCP_PROTOCOL_STRING_CONSTANT (CancelledNotificationMethod, "notifications/cancelled") |
| | JSON-RPC cancellation notification.
|
| |
|
| mcp::protocol::CXXMCP_PROTOCOL_STRING_CONSTANT (ProgressNotificationMethod, "notifications/progress") |
| | JSON-RPC progress notification.
|
| |
|
| mcp::protocol::CXXMCP_PROTOCOL_STRING_CONSTANT (RootsListChangedNotificationMethod, "notifications/roots/list_changed") |
| | Notification that the client root list changed.
|
| |
|
| mcp::protocol::CXXMCP_PROTOCOL_STRING_CONSTANT (ResourcesListChangedNotificationMethod, "notifications/resources/list_changed") |
| | Notification that the server resource list changed.
|
| |
|
| mcp::protocol::CXXMCP_PROTOCOL_STRING_CONSTANT (ResourcesUpdatedNotificationMethod, "notifications/resources/updated") |
| | Notification that one subscribed resource was updated.
|
| |
|
| mcp::protocol::CXXMCP_PROTOCOL_STRING_CONSTANT (ToolsListChangedNotificationMethod, "notifications/tools/list_changed") |
| | Notification that the server tool list changed.
|
| |
|
| mcp::protocol::CXXMCP_PROTOCOL_STRING_CONSTANT (PromptsListChangedNotificationMethod, "notifications/prompts/list_changed") |
| | Notification that the server prompt list changed.
|
| |
|
| mcp::protocol::CXXMCP_PROTOCOL_STRING_CONSTANT (LoggingMessageNotificationMethod, "notifications/message") |
| | Notification carrying a logging message.
|
| |
| ErrorObject | mcp::protocol::make_error (int code, std::string message, std::optional< Json > data=std::nullopt) |
| | Builds a JSON-RPC error object.
|
| |
| ErrorObject | mcp::protocol::make_error (ErrorCode code, std::string message, std::optional< Json > data=std::nullopt) |
| | Builds a JSON-RPC error object from a typed error code.
|
| |
| JsonRpcResponse | mcp::protocol::make_response (RequestId id, Json result) |
| | Builds a successful JSON-RPC response.
|
| |
| JsonRpcResponse | mcp::protocol::make_error_response (std::optional< RequestId > id, ErrorObject error) |
| | Builds an error JSON-RPC response.
|
| |
| JsonRpcRequest | mcp::protocol::make_request (std::string method, RequestId id, Json params=Json::object()) |
| | Builds a generic JSON-RPC request envelope.
|
| |
| JsonRpcNotification | mcp::protocol::make_notification (std::string method, Json params=Json::object()) |
| | Builds a generic JSON-RPC notification envelope.
|
| |
| JsonRpcRequest | mcp::protocol::make_initialize_request (RequestId id, Json params=Json::object()) |
| | Builds an initialize lifecycle request.
|
| |
| JsonRpcNotification | mcp::protocol::make_initialized_notification (Json params=Json::object()) |
| | Builds an initialized lifecycle notification.
|
| |
| JsonRpcRequest | mcp::protocol::make_ping_request (RequestId id, Json params=Json::object()) |
| | Builds a ping liveness request.
|
| |
| core::Result< JsonRpcMessage > | mcp::protocol::parse_message (std::string_view text) |
| | Parses any JSON-RPC message shape from text.
|
| |
| core::Result< std::string > | mcp::protocol::serialize_message (const JsonRpcMessage &message) |
| | Serializes any JSON-RPC message shape to JSON text.
|
| |
|
core::Result< JsonRpcRequest > | mcp::protocol::parse_request (std::string_view text) |
| | Parses a JSON-RPC request envelope from text.
|
| |
|
core::Result< JsonRpcResponse > | mcp::protocol::parse_response (std::string_view text) |
| | Parses a JSON-RPC response envelope from text.
|
| |
|
core::Result< JsonRpcNotification > | mcp::protocol::parse_notification (std::string_view text) |
| | Parses a JSON-RPC notification envelope from text.
|
| |
|
core::Result< std::string > | mcp::protocol::serialize_request (const JsonRpcRequest &request) |
| | Serializes a JSON-RPC request envelope to text.
|
| |
|
core::Result< std::string > | mcp::protocol::serialize_response (const JsonRpcResponse &response) |
| | Serializes a JSON-RPC response envelope to text.
|
| |
|
core::Result< std::string > | mcp::protocol::serialize_notification (const JsonRpcNotification ¬ification) |
| | Serializes a JSON-RPC notification envelope to text.
|
| |
| core::Result< std::string > | mcp::protocol::serialize_error (const ErrorObject &error, std::optional< RequestId > id=std::nullopt) |
| | Serializes a JSON-RPC error response to text.
|
| |
JSON-RPC method names and message construction/parsing helpers.
This header ties the protocol DTOs to the JSON-RPC wire format. Method name constants are the canonical strings used in request and notification envelopes; helper functions build, parse, and serialize those envelopes without changing feature-specific payload semantics.