Skip to content

Releases: rust-mcp-stack/rust-mcp-schema

v0.1.9

02 Mar 22:12
c2408c1
Compare
Choose a tag to compare

0.1.9 (2025-03-02)

Features

  • introduce CallToolError (#39) (7b8672d)

  • new cunstructor and conversion utilities for call tool operations (#41) (0b8f622)

    Details Usage example:
    • Return a Unknown Tool Error
     async fn handle_call_tool_request(
            &self,
            request: CallToolRequest,
        ) -> Result<CallToolResult, CallToolError> {
    
           ////............
    
           return Err(CallToolError::unknown_tool(tool_name)),
    
    }
    • Return a CallToolResult with TextContent :
    async fn handle_call_tool_request(
            &self,
            request: CallToolRequest,
        ) -> Result<CallToolResult, CallToolError> {
    
           ////............
    
           return Ok(CallToolResult::text_content(
                        format!( "Successfully created directory {}", path),
                        None,
                    ));
    
    }

Bug Fixes

  • add missing MCPMessage trait for MessageFromClient (#43) (48dc8af)

v0.1.8

23 Feb 00:03
12b86f3
Compare
Choose a tag to compare

0.1.8 (2025-02-23)

Features

  • add SdkError codes and types (#37) (034ee8f)
  • add utility function for easy detection of initialized notifications (#38) (39400b6)
  • add utility functions for simplified type conversions (#33) (7447800)
  • more type conversion utilities (#36) (9a0abb9)
  • new TryFrom implementation for all standard mcp message variants (#35) (08854f0)

v0.1.7

21 Feb 10:53
8de4f4d
Compare
Choose a tag to compare

0.1.7 (2025-02-21)

Features

  • add message_type to MCPMessage trait (#26) (aca2336)

  • implement ToMessage trait (#31) (435f18b)

    Details

    ToMessage Trait simplifies the construction of MCP messages, reducing the amount of code required:

    Example:

    Before Introducing the ToMessage trait

    async fn send_ping_request(ping_request: rust_mcp_schema::PingRequest) {
        let request_id = get_next_id();
    
        // construct a ServerMessage from the ping_request , with request_id
        let message = ServerMessage::Request(ServerJsonrpcRequest::new(
            request_id,
            RequestFromServer::ServerRequest(ServerRequest::PingRequest(ping_request)),
        ));
    
        // serialize message into a valid rpcJsonrpcMessage string
        let rpc_message_json_str = message.to_string();
    
        // send the ping request to the client
        tranport.send(rpc_message_json_str).await
    }

    After Introducing the ToMessage trait

    async fn send_ping_request(ping_request: rust_mcp_schema::PingRequest) {
         let request_id = get_next_id();
    
        // construct a ServerMessage from the ping_request , with request_id
        let message: ServerMessage = ping_request
            .to_message(request_id)
            .unwrap();
        
        // serialize message into a valid rpcJsonrpcMessage string
        let rpc_message_json_str = message.to_string();
    
        // send the ping request to the client
        tranport.send(rpc_message_json_str).await
    }
  • introduce FromMessage trait (#30) (cc46100)

v0.1.6

17 Feb 22:25
80b26ce
Compare
Choose a tag to compare

0.1.6 (2025-02-17)

Features

  • implement new utility functions (#24) (859b5db)

    New functions New functions provided by `MCPMessage` , available on `ClientMessage` and `ServerMessage`:
    • message.is_request() : Returns true if the message is a response type
    • message.is_response() : Returns true if the message is a request type
    • message.is_notification() : Returns true if the message is a notification type
    • message.is_error() : Returns true if the message represents an error
    • message.request_id() : Retrieves the request ID associated with the message, if applicable

Bug Fixes

  • implemented Error trait for JsonrpcErrorError (#22) (753bd87)
  • serializations to skip None Params (#25) (1f67654)

v0.1.5

15 Feb 00:14
17a9229
Compare
Choose a tag to compare

0.1.5 (2025-02-15)

Features

  • implement builder pattern for JsonrpcErrorError (#18) (71e63e5)

    Details

    Old Approach

    JsonrpcErrorError::new(
                schema_utils::RpcErrorCodes::method_not_found,
                "Method not found!".to_string(),
                None,
            );

    New Approach

    JsonrpcErrorError::method_not_found()
    • overriding the message and passing data:
    JsonrpcErrorError::method_not_found()
            .with_message("Method is not supported!".to_string())
            .with_data(Some(json!({"details": "No implementation found for this method."})))

Bug Fixes

  • Standardize error types to conform to JSON-RPC (#20) (47fd818)

v0.1.4

12 Feb 01:17
a248b66
Compare
Choose a tag to compare

0.1.4 (2025-02-12)

Features

  • enhance schema_utils and mcp_schema (#12) (2dbd271)
    • Implemented the Display trait for the Result type in mcp_schema to simplify instantiation.
    • Implemented Display trait for ClientMessage and ServerMessage variants of the `schema_utils

v0.1.3

10 Feb 00:53
c4b66bb
Compare
Choose a tag to compare

0.1.3 (2025-02-10)

Bug Fixes

  • Restored the unit test for verifying the default case in the detect_message_type() function. (#10) (c077d75)

  • Re-generated schema and schema_utils (#10) (c077d75)

v0.1.2

09 Feb 23:05
2dbe0a1
Compare
Choose a tag to compare

0.1.2 (2025-02-09)

Features

  • re-generated schema.rs files for both draft and latest version (#8) (de51f57)

  • improved schema utils (#8) (de51f57)

v0.1.1

09 Feb 12:45
9da0787
Compare
Choose a tag to compare

0.1.1 (2025-02-09)

Bug Fixes

v0.1.0

08 Feb 23:40
babf0eb
Compare
Choose a tag to compare

0.1.0 (2025-02-08)

Features