Skip to content

Add pre-execution validation for tool calls #2970

@devincapriola

Description

@devincapriola

Agents in this framework can call tools and trigger real-world actions.

Right now, tool execution appears to rely on upstream logic and model output, but there doesn’t seem to be a deterministic validation step at the moment of execution.

This creates a gap where:

  • tool calls may be malformed or partially specified
  • parameters may differ from what was intended upstream
  • execution can occur without a final verification of the exact payload

Logging, guardrails, and prompt-level controls help guide behavior, but they don’t guarantee that the final executed action is explicitly validated at the execution boundary.

Suggestion

Introduce a lightweight validation step before any tool is executed that verifies:

  • tool name
  • parameters (schema + expected values)
  • calling agent / context
  • destination or target system
  • timestamp / validity window
  • optional nonce or replay protection

If validation fails → the tool call is rejected before execution.

This could be implemented as a wrapper around tool execution so existing agent logic remains unchanged.

Happy to share a reference implementation pattern if useful.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions