Title: CallToolResult type missing member structuredContent · Issue #810 · modelcontextprotocol/python-sdk · GitHub
Open Graph Title: CallToolResult type missing member structuredContent · Issue #810 · modelcontextprotocol/python-sdk
X Title: CallToolResult type missing member structuredContent · Issue #810 · modelcontextprotocol/python-sdk
Description: Describe the bug When a tool call is made to any tool with a defined outputSchema, the server absolutely blows up if the function implementing the tool call does not include structuredContent. This structuredContent is included in the da...
Open Graph Description: Describe the bug When a tool call is made to any tool with a defined outputSchema, the server absolutely blows up if the function implementing the tool call does not include structuredContent. This...
X Description: Describe the bug When a tool call is made to any tool with a defined outputSchema, the server absolutely blows up if the function implementing the tool call does not include structuredContent. This...
Opengraph URL: https://github.com/modelcontextprotocol/python-sdk/issues/810
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"CallToolResult type missing member structuredContent","articleBody":"**Describe the bug**\n\nWhen a tool call is made to any tool with a defined outputSchema, the server absolutely blows up if the function implementing the tool call does not include structuredContent. \n\nThis structuredContent is included in the data.result of the server's response.\n\nOn client side, it definitely gets parsed and included in the CallToolResult object returned by session.call_tool().\n\nAll great so far.\n\nHowever, the definition of CallToolResult class **does not allow for a member named _structuredContent_**.\n\n(it also does not allow for a member named structured_content so that's not the issue).\n\n\n**To Reproduce**\nSteps to reproduce the behavior:\n1. Implement a tool \"get_structure\" with an _outputSchema_ using the ModelContentProtocol typescript SDK.\n2. Call that tool from the python SDK:\n ```python\n result:CallToolResult = await session.call_tool(name=\"get_structure\",arguments={})\n print(f\"result.structuredContent = {result.structuredContent}\")\n ```\n3. Notice that the print succeeds\n4. Notice that pyright complains that **Attribute \"structuredContent\" is unknown**\n\n**Expected behavior**\nThere should be an optional member called structuredContent in the declaration of CallToolResult:\n ```python\nstructuredContent: dict[str, Any] | list[Any] | str | int | float | bool | None = None\n```\n\n**Screenshots**\n\n\u003cimg width=\"1919\" alt=\"Image\" src=\"https://github.com/user-attachments/assets/1c4d3940-fdf5-4ae9-8033-034d2bcb823d\" /\u003e\n\n\n**Additional context**\nAdd any other context about the problem here.\n","author":{"url":"https://github.com/stevemadere","@type":"Person","name":"stevemadere"},"datePublished":"2025-05-26T17:34:14.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":2},"url":"https://github.com/810/python-sdk/issues/810"}
| 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:a362d09f-c39c-4ae0-9615-dbcd4a071f3c |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | ADF8:3EE07D:297DE4:3836BF:6A5A6BE1 |
| html-safe-nonce | 770ce8588c2485305812f1ce13f3d98f327ee898663ea7f5c9182926d403908d |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBREY4OjNFRTA3RDoyOTdERTQ6MzgzNkJGOjZBNUE2QkUxIiwidmlzaXRvcl9pZCI6IjI5NTExNTgxMTA2MDA0NTcxODUiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 55d7eb4d81f27e9dc24e357b63080390663c72fee341ab99e6f98f623be4d3e9 |
| hovercard-subject-tag | issue:3091752303 |
| 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/810/issue_layout |
| twitter:image | https://opengraph.githubassets.com/f5f47833ffdf3d788eb3b5126adaf182df690c1a890fc585aa25e40c14ae5303/modelcontextprotocol/python-sdk/issues/810 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/f5f47833ffdf3d788eb3b5126adaf182df690c1a890fc585aa25e40c14ae5303/modelcontextprotocol/python-sdk/issues/810 |
| og:image:alt | Describe the bug When a tool call is made to any tool with a defined outputSchema, the server absolutely blows up if the function implementing the tool call does not include structuredContent. This... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | stevemadere |
| hostname | github.com |
| expected-hostname | github.com |
| None | 922bdba685ea48400234d557977f0e32d9adbae6f5125725b4f48cacc6801106 |
| 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 | 03575fc589c0e2692de839d7ca2b3aa5b5179f52 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width