A custom error type UnknownTool that wraps a String.
This can be used as the error type in the result of a CallToolRequest when a non-existent or unimplemented tool is called.
“Similar to JsonrpcMessage, but with the variants restricted to client-side messages.”
ClientMessage represents a message sent by an MCP Client and received by an MCP Server.
An enum representing various types of messages that can be sent from an MCP Client.
It provides a typed structure for the message payload while skipping internal details like
requestId and protocol version, which are used solely by the transport layer and
do not need to be exposed to the user.
An enum representing various types of messages that can be sent from an MCP Server.
It provides a typed structure for the message payload while skipping internal details like
requestId and protocol version, which are used solely by the transport layer and
do not need to be exposed to the user.
To determine standard and custom notifications received from the MCP Client
Custom notifications are of type serde_json::Value and can be deserialized into any custom type.
To determine standard and custom notifications received from the MCP Server
Custom notifications are of type serde_json::Value and can be deserialized into any custom type.
To determine standard and custom request from the client side
Custom requests are of type serde_json::Value and can be deserialized into any custom type.
To determine standard and custom request from the server side
Custom requests are of type serde_json::Value and can be deserialized into any custom type.
To determine standard and custom results from the client side
Custom results (CustomResult) are of type serde_json::Value and can be deserialized into any custom type.
To determine standard and custom results from the server side
Custom results (CustomResult) are of type serde_json::Value and can be deserialized into any custom type.
“Similar to JsonrpcMessage, but with the variants restricted to client-side messages.”
ServerMessage represents a message sent by an MCP Server and received by an MCP Client.
A trait for converting a message of type T into Self.
This is useful for transforming mcp messages into a Type that could be serialized into a JsonrpcMessage.