Skip to content

Support fixed arguments for tool calls #3038

Closed
Closed

Description

@Ahmed-Elkholy

** Please make sure you read the contribution guide and file the issues in the right place. **
Contribution guide.

**Is your feature request related to a problem?
Currently, agents cannot reliably pass consistent parameters like authentication tokens, base URLs, or other configuration values to tools across multiple invocations. This creates several issues:

  • Agents must be prompted to pass the parameters to the mcp tool calling that requires url and tokens
  • There's no mechanism to enforce required parameters that should remain constant throughout an agent session
  • Security concerns arise from repeatedly passing sensitive values like tokens through the agent's prompt

Describe the solution you'd like
Provide fixed tool parameters as a dictionary when initiating the Toolset.

Describe alternatives you've considered
Using before callback to modify the arguments before the tool calls to add the fixed arguments.
Additional context
Refer to the support done in Strands Agents https://strandsagents.com/latest/documentation/docs/user-guide/concepts/agents/hooks/#fixed-tool-arguments.

Activity

  1. added
    mcp[Component] This issues is related to MCP support
    on Sep 28, 2025
  2. added theissue type on Sep 28, 2025
  3. xuanyang15 commented on Nov 20, 2025

    @xuanyang15
    Collaborator

    ADK now has Plugins, which seems to be a good option for this.

    class FixedArgumentsPlugin(BasePlugin):
        def __init__(self, fixed_args: Dict[str, Dict[str, Any]]):
            super().__init__(name="fixed_arguments")
            self.fixed_args = fixed_args
        
        async def before_tool_callback(
            self, *, tool: BaseTool, tool_args: dict[str, Any], tool_context: ToolContext
        ) -> None:
            if tool.name in self.fixed_args:
                # Merge fixed args (fixed args take precedence)
                tool_args.update(self.fixed_args[tool.name])
    

    We prefer not to change the interface if plugin works.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

mcp[Component] This issues is related to MCP support

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions