Skip to content

Tool Arguments Filtered by ADK Causing Tool Call Failures #32

@KeganHollern

Description

@KeganHollern

Tools produced by FrontendToolset() have a Signature that does not match the AG-UI Tool parameters.

The impact is that when the model calls the tool with the correct arguments, the FunctionTool.run_sync function filters out the LLM's arguments because they are not called "args". https://github.com/google/adk-python/blob/main/src/google/adk/tools/function_tool.py#L161-L169

It seems the official AG-UI library has patched this by overwriting the tool signature based on the AG-UI Tool Parameters:
https://github.com/ag-ui-protocol/ag-ui/blob/main/integrations/adk-middleware/python/src/ag_ui_adk/client_proxy_tool.py#L86-L88


My temporary fix for this is to modify the tool call arguments wrapping them in an "args" object using a before_tool_call hook in the agent.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions