You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
evals: AgentConfig.from_agent raises TypeError for ADK agents using toolsets (e.g. McpToolset) #6861
File ".../vertexai/_genai/types/evals.py", line 128, in from_agent
tools=AgentConfig._get_tool_declarations_from_agent(agent),
File ".../vertexai/_genai/types/evals.py", line ~100, in _get_tool_declarations_from_agent
genai_types.FunctionDeclaration.from_callable_with_api_option(callable=tool)
File ".../google/genai/types.py", line 4405, in from_callable_with_api_option
for name, param in inspect.signature(callable).parameters.items():
TypeError: <google.adk.tools.mcp_tool.mcp_toolset.McpToolset object at 0x...> is not a callable object
Analysis
_get_tool_declarations_from_agent handles ADK tools exposing _get_declaration() (since the from __future__ import annotations fix), but ADK toolsets have no _get_declaration and are not plain callables — they expose their tools only asynchronously via get_tools(readonly_context). They fall through to the inspect.signature() path and raise. Any MCP-tooled ADK agent is uninspectable for eval inference as a result (this breaks agents-cli eval generate for such agents too).
Proposed fix
Skip toolsets in the extraction loop (declarations are metadata; toolset tools resolve only at runtime). PR incoming for both vertexai/_genai/types/evals.py and agentplatform/_genai/types/evals.py.
Activity
ks-hj commentedon Jun 7, 2026
Withdrawn.