Skip to content

docs: clarify structured output validation timing#2227

Closed
lavish0000 wants to merge 2 commits intomodelcontextprotocol:mainfrom
lavish0000:docs/structured-output-validation-1702
Closed

docs: clarify structured output validation timing#2227
lavish0000 wants to merge 2 commits intomodelcontextprotocol:mainfrom
lavish0000:docs/structured-output-validation-1702

Conversation

@lavish0000
Copy link
Copy Markdown

Closes #1702

Summary:

  • document that structured-output validation happens after the tool function returns
  • clarify that validation failures do not roll back side effects and should be treated as implementation/schema mismatches
  • add guidance for side-effectful tools, including operation-id and split-phase patterns

Testing:

  • python3 -m uv run pytest tests/client/test_output_schema_validation.py

@maxisbey maxisbey added the documentation Improvements or additions to documentation label Mar 6, 2026
@maxisbey
Copy link
Copy Markdown
Contributor

Thanks for the PR! Per our CONTRIBUTING.md, PRs require a corresponding issue with the ready for work label so we can agree on scope before reviewing code. Closing for now — please open an issue first and re-submit once it's triaged.

AI Disclaimer

@maxisbey maxisbey closed this Mar 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Clarify and improve behavior when tool output fails schema validation

2 participants