Skip to content

feat: implement new utility functions #24

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
merged 3 commits into from
Feb 17, 2025

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