Title: call_tool decorator on the server side add the validate_output parameter · Issue #1850 · modelcontextprotocol/python-sdk · GitHub
Open Graph Title: call_tool decorator on the server side add the validate_output parameter · Issue #1850 · modelcontextprotocol/python-sdk
X Title: call_tool decorator on the server side add the validate_output parameter · Issue #1850 · modelcontextprotocol/python-sdk
Description: Description Purpose Allows the server to independently control whether to perform outputSchema validation (consistent with validate_input). When both validate_input and validate_output are disabled, tool invocation skips _get_cached_tool...
Open Graph Description: Description Purpose Allows the server to independently control whether to perform outputSchema validation (consistent with validate_input). When both validate_input and validate_output are disabled...
X Description: Description Purpose Allows the server to independently control whether to perform outputSchema validation (consistent with validate_input). When both validate_input and validate_output are disabled...
Opengraph URL: https://github.com/modelcontextprotocol/python-sdk/issues/1850
X: @github
Domain: patch-diff.githubusercontent.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"call_tool decorator on the server side add the validate_output parameter","articleBody":"### Description\n\n**Purpose**\n1. Allows the server to independently control whether to perform outputSchema validation (consistent with validate_input).\n2. When both validate_input and validate_output are disabled, tool invocation skips _get_cached_tool_definition, thereby improving performance when calling call_tool.\n\n**Code demo**\n```\ndef call_tool(self, *, validate_input: bool = True, validate_output: bool = True):\n xxx\n```\nI will submit a PR, please help to merge it when I do.\n\n### References\n\n_No response_","author":{"url":"https://github.com/tanhaipeng","@type":"Person","name":"tanhaipeng"},"datePublished":"2026-01-12T08:08:10.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":0},"url":"https://github.com/1850/python-sdk/issues/1850"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:9e7ed90a-e54b-180b-f867-57e7d5e11cd3 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | E4CE:1DD778:7EC0A6:ABC8EE:696E7EEB |
| html-safe-nonce | 8f3776153e2a24fd4f7c26a11c37e74640faf07bdbcf000bfa78905ad816eac2 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFNENFOjFERDc3ODo3RUMwQTY6QUJDOEVFOjY5NkU3RUVCIiwidmlzaXRvcl9pZCI6IjE1ODAzNTU5MDQzNDkzMDY2MDMiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 7d40be3d08c749e20f0e2ccc066bd1eb4f10de0e2f7db5dcc39b0be20e2265db |
| hovercard-subject-tag | issue:3803198956 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/modelcontextprotocol/python-sdk/1850/issue_layout |
| twitter:image | https://opengraph.githubassets.com/b6d4b6410cbaf4c8f1734c9946286aeb49a0e6e96ecba2bf080b7f29e767c416/modelcontextprotocol/python-sdk/issues/1850 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/b6d4b6410cbaf4c8f1734c9946286aeb49a0e6e96ecba2bf080b7f29e767c416/modelcontextprotocol/python-sdk/issues/1850 |
| og:image:alt | Description Purpose Allows the server to independently control whether to perform outputSchema validation (consistent with validate_input). When both validate_input and validate_output are disabled... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | tanhaipeng |
| hostname | github.com |
| expected-hostname | github.com |
| None | fdad15fd2ad43212aa8b8be5f2c2725550f8374ceeeb154a999ad9145b43f3f7 |
| turbo-cache-control | no-preview |
| go-import | github.com/modelcontextprotocol/python-sdk git https://github.com/modelcontextprotocol/python-sdk.git |
| octolytics-dimension-user_id | 182288589 |
| octolytics-dimension-user_login | modelcontextprotocol |
| octolytics-dimension-repository_id | 862584018 |
| octolytics-dimension-repository_nwo | modelcontextprotocol/python-sdk |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 862584018 |
| octolytics-dimension-repository_network_root_nwo | modelcontextprotocol/python-sdk |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 27b23bc056eb973d350fc95afc848757edb9e7a9 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width