Skip to content

docs: clarify structured output validation timing#2227

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

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

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
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