Skip to content

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.

2 participants