When using MCPTools with requires_confirmation_tools parameter, tools that should require confirmation are executed immediately without pausing for user approval. The HITL (Human-in-the-Loop) feature doesn’t work for MCP tools.
Version: Agno 2.2.3
Component: agno.tools.mcp.MCPTools
Root Cause:
MCPTools.build_tools() creates Function objects directly (line 288-295) but doesn’t set the requires_confirmation parameter.
When MCPTools registers tools, it bypasses Toolkit.register() which would normally set requires_confirmation=tool_name in self.requires_confirmation_tools (see Toolkit.register() line 131).
Instead, MCPTools directly creates Function objects and registers them in self.functions dict, missing the requires_confirmation flag entirely.
Steps to reproduce:
- Create MCPTools instance with requires_confirmation_tools:
catalog_tools = MCPTools(
transport=“streamable-http”,
url=“https://example.com/mcp”,
requires_confirmation_tools=[“update_data”]
) - Connect to MCP server:
await catalog_tools.connect() - Add tool to an Agent:
agent = Agent(tools=[catalog_tools]) - Agent calls “update_data”
Expected: Run pauses, RunPausedEvent emitted, tool.confirmed must be set to continueActual: Tool executes immediately without pause
Toolkit.register() correctly sets requires_confirmation: agno/tools/toolkit.py:131
MCPTools should match this behavior when registering MCP server tools
Let me know if there is another way around.