Skip to content

Conversation

@hashemix
Copy link
Member

📌 Summary

Added new utility functions to schema-utils to support MCP application development:

Added and implemented the MCPMessage trait with helpful methods, and provided implementations for ClientMessage and ServerMessage.

Implemented PartialEq, Eq, and Hash traits for requestId, enabling comparison and storage in HashMaps.

💡 Additional Notes

New functions provided by MCPMessage :

  • 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

✨ Changes Made

  • Introduced and implemented MCPMessage trait for ClientMessage and ServerMessage
  • Implemented PartialEq and Eq and Hash traits for requestId
  • Change 3

@hashemix hashemix merged commit 859b5db into main Feb 17, 2025
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant