Does MCPTools refresh_connection=True cause noticeable performance overhead ?
#7810
user1500177
started this conversation in
General
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hello — I'm evaluating the MCPTools
refresh_connectionoption in Agno's MCP integration and want community input on performance tradeoffs.Context:
refresh_connection=Trueto force a reconnect and rebuild of tools per run when the gateway can be unstable.build_tools()which internally doesavailable_tools = await self.session.list_tools()and then registers each tool (creating Function objects). This happens whenrefresh_connectionis enabled in the agent tool-loading path: (I SAW THE BLOW IN the code base of agno tht happens in th build tools fro mthe session the listing of tools happen also IS THIS addin a small overhead or A LARGE ONE?)Excerpt (simplified):
My questions:
list_tools()and re-registering tools per-run usually cause a measurable performance hit? If so, what are typical costs (latency, CPU, memory) you’ve observed?refresh_connection=Trueas a safe default when MCP servers occasionally restart, or should it only be used when servers are unstable?Extra info I can provide:
Thanks — looking for practical experiences and recommended best practices.
Beta Was this translation helpful? Give feedback.
All reactions