Skip to content

feat!: relax tool result structuredContent type (SEP-2106)#933

Draft
DaleSeo wants to merge 1 commit into
mainfrom
revert-932-revert-919-fix/tool-result-content-structured-value
Draft

feat!: relax tool result structuredContent type (SEP-2106)#933
DaleSeo wants to merge 1 commit into
mainfrom
revert-932-revert-919-fix/tool-result-content-structured-value

Conversation

@DaleSeo

@DaleSeo DaleSeo commented Jun 26, 2026

Copy link
Copy Markdown
Member

Reverts #932

Motivation and Context

This was discovered while reviewing PR #895. Besides CallToolResult, ToolResultContent should also be typed with its structured content as Option<Value> to accommodate any JSON value.

2025-11-25 2026-07-28
2026-06-23 at 15 42 59 2026-06-23 at 15 41 47

How Has This Been Tested?

Added tests

Breaking Changes

Yes. The public field ToolResultContent.structured_content changes type from Option<JsonObject> to Option<Value>.

The green SemVer Check is a false negative due to known upstream gap: obi1kenobi/cargo-semver-checks#148

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

@github-actions github-actions Bot added T-test Testing related changes T-config Configuration file changes T-core Core library changes T-model Model/data structure changes labels Jun 26, 2026
@DaleSeo DaleSeo changed the title Revert "Revert "feat!: relax tool result structuredContent type (SEP-2106)"" feat!: relax tool result structuredContent type (SEP-2106) Jun 26, 2026
@DaleSeo DaleSeo self-assigned this Jun 26, 2026
@DaleSeo DaleSeo linked an issue Jun 26, 2026 that may be closed by this pull request
4 tasks
@DaleSeo DaleSeo force-pushed the revert-932-revert-919-fix/tool-result-content-structured-value branch from 9f18f9e to 5104d3d Compare June 26, 2026 20:51
Re-applies #919 (reverted by #932): ToolResultContent.structured_content
becomes Option<Value> so non-object structured content is accepted,
matching CallToolResult and SEP-2106.

BREAKING CHANGE: ToolResultContent.structured_content changes from
Option<JsonObject> to Option<Value>.
@DaleSeo DaleSeo force-pushed the revert-932-revert-919-fix/tool-result-content-structured-value branch from 5104d3d to 6755d12 Compare June 26, 2026 21:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

2026-07-28 T-config Configuration file changes T-core Core library changes T-model Model/data structure changes T-test Testing related changes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Implement SEP-2106: Tool schemas conform to JSON Schema 2020-12

1 participant