Skip to content

feat: make structured mirroring explicit - #1085

Open
DaleSeo wants to merge 1 commit into
mainfrom
structured-content-explicit-mirror
Open

feat: make structured mirroring explicit#1085
DaleSeo wants to merge 1 commit into
mainfrom
structured-content-explicit-mirror

Conversation

@DaleSeo

@DaleSeo DaleSeo commented Jul 29, 2026

Copy link
Copy Markdown
Member

Motivation and Context

Automatic mirroring can double large structured payloads and makes a compatibility fallback an implicit SDK policy. This implements the alternative discussed in #1046: structured output is the default, and callers that need text content choose it explicitly without adding another return-type wrapper or macro behavior.

How Has This Been Tested?

Added integration tests

Breaking changes

Technically none because the API hasn't changed.

However, code that relies on structured, structured_error, or Json<T> to automatically populate content now needs to add the fallback explicitly with with_content or construct the CallToolResult directly.

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-core Core library changes T-handler Handler implementation changes labels Jul 29, 2026
@DaleSeo DaleSeo self-assigned this Jul 29, 2026
@DaleSeo
DaleSeo marked this pull request as ready for review July 29, 2026 21:05
@DaleSeo
DaleSeo requested a review from a team as a code owner July 29, 2026 21:05
@alexhancock

Copy link
Copy Markdown
Contributor

cc @olaservo can you review?

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-handler Handler implementation changes T-test Testing related changes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants