Skip to content

chore(main): release 0.1.7 #27

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged

Conversation

hashemix
Copy link
Member

@hashemix hashemix commented Feb 19, 2025

🤖 Automated release created! 🚀

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)


This PR was generated with Release Please. See documentation.

@hashemix hashemix force-pushed the release-please--branches--main--components--rust-mcp-schema branch 3 times, most recently from ba8214d to 42f2f62 Compare February 21, 2025 00:03
@hashemix hashemix force-pushed the release-please--branches--main--components--rust-mcp-schema branch from 42f2f62 to f2ce203 Compare February 21, 2025 10:50
@hashemix hashemix merged commit 8de4f4d into main Feb 21, 2025
6 checks passed
@hashemix
Copy link
Member Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant