You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
CallToolResult type missing member structuredContent #810
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 data.result of the server's response.
On client side, it definitely gets parsed and included in the CallToolResult object returned by session.call_tool().
All great so far.
However, the definition of CallToolResult class does not allow for a member named structuredContent.
(it also does not allow for a member named structured_content so that's not the issue).
To Reproduce
Steps to reproduce the behavior:
Implement a tool "get_structure" with an outputSchema using the ModelContentProtocol typescript SDK.
Call that tool from the python SDK: python result:CallToolResult = await session.call_tool(name="get_structure",arguments={}) print(f"result.structuredContent = {result.structuredContent}")
Notice that the print succeeds
Notice that pyright complains that Attribute "structuredContent" is unknown
Expected behavior
There should be an optional member called structuredContent in the declaration of CallToolResult:
Activity
imfing commentedon May 26, 2025
I think
outputSchemaandCallToolResult.structuredContentsupport is WIP in #685TypeScript SDK has better support for this.
bhosmer-ant commentedon Jul 9, 2025
structuredContentsupport added in #993 (v1.10.0)