Skip to content

Conversation

@ccamel55
Copy link
Contributor

Motivation and Context

Issue #355 seems to be about using this crate as a client, however the contrary also needs to be addressed.

The 2025-06-18 specification states the following recommendation:

For backwards compatibility, a tool that returns structured content SHOULD also return the serialized JSON in a TextContent block.

This issue can be observed when trying to use tasks which return structured_content with clients that don't support 2025-06-18 yet.

How Has This Been Tested?

Unit tests check:

  • both content and structured_content exist for structured results
  • content contains serialized version of structured_content

Breaking Changes

No breaking changes.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation update

Checklist

  • I have read the MCP Documentation
  • My code follows the repository's style guidelines
  • New and existing tests pass locally
  • I have added appropriate error handling
  • I have added or updated documentation as needed

Additional context

@github-actions github-actions bot added T-test Testing related changes T-core Core library changes labels Aug 12, 2025
@4t145
Copy link
Collaborator

4t145 commented Aug 12, 2025

Just have a look on https://modelcontextprotocol.io/specification/2025-06-18/server/tools

This should be the correct implementation.

@4t145 4t145 merged commit 3d8e950 into modelcontextprotocol:main Aug 12, 2025
11 checks passed
@github-actions github-actions bot mentioned this pull request Aug 12, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

T-core Core library changes T-test Testing related changes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants