-
Notifications
You must be signed in to change notification settings - Fork 46
Open
Description
I'm wrapping a graphql service in an MCP server, providing an introspect tool that an agent can run to see what's available in the service. However running introspect like so introspect_tool(type_name="Query", depth=2) yields multiple items, but the MCPAdaptTool only keeps the first one, saying
tool introspect returned multiple content, using the first one
Here's what I'm doing:
with ToolCollection.from_mcp(
{"url": "http://localhost:5000/mcp", "transport": "streamable-http"},
trust_remote_code=True,
) as tool_collection:
introspect_tool = [t for t in tool_collection.tools if t.name == "introspect"][0]
graphql_schema = introspect_tool(type_name="Query", depth=2)
print(graphql_schema)
which yields me
tool introspect returned multiple content, using the first one
type Person {
id: UUID!
name: String!
age: String!
}
Is there any reason to only keep the first one? I want to get all the results and feed them to the agent. Perhaps an option to concatenate the contents into one item would be an option here?
Metadata
Metadata
Assignees
Labels
No labels