From 14bdb390fe66683ac2101d0cb32d040fbbff3cd0 Mon Sep 17 00:00:00 2001 From: Iggy Date: Wed, 8 Oct 2025 17:03:33 +0200 Subject: [PATCH] Fix return multiple StreamableHTTP content --- mcpgateway/transports/streamablehttp_transport.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mcpgateway/transports/streamablehttp_transport.py b/mcpgateway/transports/streamablehttp_transport.py index f2c10f6cc..0396198c1 100644 --- a/mcpgateway/transports/streamablehttp_transport.py +++ b/mcpgateway/transports/streamablehttp_transport.py @@ -387,7 +387,7 @@ async def call_tool(name: str, arguments: dict) -> List[Union[types.TextContent, logger.warning(f"No content returned by tool: {name}") return [] - return [types.TextContent(type=result.content[0].type, text=result.content[0].text)] + return [types.TextContent(type=content.type, text=content.text) for content in result.content] except Exception as e: logger.exception(f"Error calling tool '{name}': {e}") return []