Skip to content

feat: implement new utility functions for CallToolResult and TextContent #79

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 1 commit into from
Jul 1, 2025

Conversation

hashemix
Copy link
Member

@hashemix hashemix commented Jul 1, 2025

📌 Summary

This PR introduces a set of convenience constructor methods for the CallToolResult struct to simplify the creation of results with various content types. It also supports builder-style methods for attaching metadata and structured content.

This functionality was already available in previous schema versions and is now supported in the 2025_06_18 and draft versions as well, with a slightly updated function signature.

example:

let res_link = CallToolResult::resource_link(vec![ link1, link2  ]);

let text_result = CallToolResult::text_content(vec![ TextContent::from(goodbye_message) ])

@hashemix hashemix merged commit 1c8aa34 into main Jul 1, 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