Skip to content

Commit f915b30

Browse files
IgnasiBoschpopagruia
authored andcommitted
Fix return multiple StreamableHTTP content (IBM#1189)
1 parent 23100b1 commit f915b30

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

mcpgateway/transports/streamablehttp_transport.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -387,7 +387,7 @@ async def call_tool(name: str, arguments: dict) -> List[Union[types.TextContent,
387387
logger.warning(f"No content returned by tool: {name}")
388388
return []
389389

390-
return [types.TextContent(type=result.content[0].type, text=result.content[0].text)]
390+
return [types.TextContent(type=content.type, text=content.text) for content in result.content]
391391
except Exception as e:
392392
logger.exception(f"Error calling tool '{name}': {e}")
393393
return []

0 commit comments

Comments
 (0)