Expand description
re-exports
Structs§
- CallTool Error 
- A specific error type that can hold any kind of error and is used to
encapsulate various error scenarios when a CallToolRequestfails.
- ClientJsonrpc Notification 
- “Similar to JsonrpcNotification , but with the variants restricted to client-side notifications.”
- ClientJsonrpc Request 
- “Similar to JsonrpcRequest , but with the variants restricted to client-side requests.”
- ClientJsonrpc Response 
- “Similar to JsonrpcResponse , but with the variants restricted to client-side responses.”
- SdkError
- ServerJsonrpc Notification 
- “Similar to JsonrpcNotification , but with the variants restricted to server-side notifications.”
- ServerJsonrpc Request 
- “Similar to JsonrpcRequest , but with the variants restricted to client-side requests.”
- ServerJsonrpc Response 
- “Similar to JsonrpcResponse , but with the variants restricted to server-side responses.”
- UnknownTool 
- A custom error type UnknownToolthat wraps aString. This can be used as the error type in the result of aCallToolRequestwhen a non-existent or unimplemented tool is called.
Enums§
- ClientMessage 
- “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.
- MessageFrom Client 
- 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
requestIdand protocol version, which are used solely by the transport layer and do not need to be exposed to the user.
- MessageFrom Server 
- 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
requestIdand protocol version, which are used solely by the transport layer and do not need to be exposed to the user.
- MessageTypes 
- NotificationFrom Client 
- 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.
- NotificationFrom Server 
- 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.
- RequestFrom Client 
- 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.
- RequestFrom Server 
- 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.
- ResultFrom Client 
- 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.
- ResultFrom Server 
- 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.
- RpcErrorCodes 
- Enum representing standard JSON-RPC error codes.
- SdkErrorCodes 
- Enum representing SDK error codes.
- ServerMessage 
- “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.
Traits§
- FromMessage 
- A trait for converting a message of type TintoSelf. This is useful for transforming mcp messages into a Type that could be serialized into a JsonrpcMessage.
- MCPMessage
- RPCMessage
- Represents a generic MCP (Model Context Protocol) message. This trait defines methods to classify and extract information from messages.
- ToMessage