tool response error #198
Description
Describe the bug
If return the tool response like this
return types.CallToolResult(
content=[types.TextContent(type="text", text=json.dumps(result, indent=2))]
)
after tool call this issue coming
error:
meta=None content=[TextContent(type='text', text="9 validation errors for CallToolResult\ncontent.0.TextContent\n Input should be a valid dictionary or instance of TextContent [type=model_type, input_value=('meta', None), input_type=tuple]\n For further information visit https://errors.pydantic.dev/2.10/v/model_type\ncontent.0.ImageContent\n Input should be a valid dictionary or instance of ImageContent [type=model_type, input_value=('meta', None), input_type=tuple]\n For further information visit https://errors.pydantic.dev/2.10/v/model_type\ncontent.0.EmbeddedResource\n Input should be a valid dictionary or instance of EmbeddedResource [type=model_type, input_value=('meta', None), input_type=tuple]\n For further information visit https://errors.pydantic.dev/2.10/v/model_type\ncontent.1.TextContent\n Input should be a valid dictionary or instance of TextContent [type=model_type, input_value=('content', [TextContent(...n}', annotations=None)]), input_type=tuple]\n For further information visit https://errors.pydantic.dev/2.10/v/model_type\ncontent.1.ImageContent\n Input should be a valid dictionary or instance of ImageContent [type=model_type, input_value=('content', [TextContent(...n}', annotations=None)]), input_type=tuple]\n For further information visit https://errors.pydantic.dev/2.10/v/model_type\ncontent.1.EmbeddedResource\n Input should be a valid dictionary or instance of EmbeddedResource [type=model_type, input_value=('content', [TextContent(...n}', annotations=None)]), input_type=tuple]\n For further information visit https://errors.pydantic.dev/2.10/v/model_type\ncontent.2.TextContent\n Input should be a valid dictionary or instance of TextContent [type=model_type, input_value=('isError', False), input_type=tuple]\n For further information visit https://errors.pydantic.dev/2.10/v/model_type\ncontent.2.ImageContent\n Input should be a valid dictionary or instance of ImageContent [type=model_type, input_value=('isError', False), input_type=tuple]\n For further information visit https://errors.pydantic.dev/2.10/v/model_type\ncontent.2.EmbeddedResource\n Input should be a valid dictionary or instance of EmbeddedResource [type=model_type, input_value=('isError', False), input_type=tuple]\n For further information visit https://errors.pydantic.dev/2.10/v/model_type", annotations=None)] isError=True