Uh oh!
There was an error while loading. Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork 3.8k
Align with spec #3002: optional clientInfo, serverInfo in result _meta#3143
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Uh oh!
There was an error while loading. Please reload this page.
Changes from all commits
73a62ad46c200da51c9f5f18da958eb8d701bbc469debec209f54d31fb9b64cd1258af9a0881f476d758d8b7d0cb608b233d5f67334ab5e429d33ebFile filter
Filter by extension
Conversations
Uh oh!
There was an error while loading. Please reload this page.
Jump to
Uh oh!
There was an error while loading. Please reload this page.
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -102,10 +102,13 @@ Call it and the result carries both representations: | ||
| "content": [{"type": "text", "text": "Found 3 books matching 'dune'."}], | ||
| "structuredContent": {"matches": 3, "query": "dune"}, | ||
| "isError": false, | ||
| "resultType": "complete" | ||
| "resultType": "complete", | ||
| "_meta": {"io.modelcontextprotocol/serverInfo": {"name": "Bookshop", "version": "2.0.0"}} | ||
maxisbey marked this conversation as resolved.
Uh oh!There was an error while loading. Please reload this page. | ||
| } | ||
| ``` | ||
| The `_meta` block is the server's identity stamp: the SDK adds it to every 2026-era result, with the `version` from the constructor (a server that sets none reports an empty string). A server that must not identify itself can strip the key with a middleware, which owns the results it returns. | ||
maxisbey marked this conversation as resolved.
Uh oh!There was an error while loading. Please reload this page. | ||
| The server never compares the two fields. This SDK's `Client` does: return `structured_content` that doesn't satisfy the `output_schema` you declared and `call_tool` raises a `RuntimeError` that starts with `Invalid structured content returned by tool search_books` and goes on to quote the `jsonschema` failure. Promising a schema is cheap; keeping it is on you. The whole ladder of return types and schemas is in **[Structured Output](../servers/structured-output.md)**. | ||
| ## `_meta`: for the application, not the model | ||
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
P2: Interceptor docs promise core-schema enforcement that the response pipeline does not provide for modern extension
resultTypevalues. Keep the stamp guarantee, but remove the “off-schema” claim so extension authors do not rely on validation that_serializedeliberately bypasses.Prompt for AI agents