Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions README.v2.md
Original file line number Diff line number Diff line change
Expand Up @@ -393,6 +393,23 @@ Structured results are automatically validated against the output schema
generated from the annotation. This ensures the tool returns well-typed,
validated data that clients can easily process.

##### Validation Timing and Side Effects

Output-schema validation happens after the tool function returns. If a tool
performs side effects before returning, those side effects are not rolled back
when structured-output validation fails.

A validation failure means the tool implementation and its declared schema are
out of sync. Treat it as a server bug, not as a signal that the operation was
safe to retry.

For tools with important side effects, prefer patterns that make the state
explicit, for example:

- return an operation or job identifier and expose completion state separately
- separate "start work" from "fetch result" into different tools or resources
- keep the structured result shape stable and version schema changes carefully

**Note:** For backward compatibility, unstructured results are also
returned. Unstructured results are provided for backward compatibility
with previous versions of the MCP specification, and are quirks-compatible
Expand Down