Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

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
hashemix merged 1 commit into main from feat/add-new-utility-functions
Jul 1, 2025

Conversation

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
Reviewers
No reviews
Assignees
No one assigned
Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

1 participant

AltStyle によって変換されたページ (->オリジナル) /