Autonomous Agents, Tool-Calling Definitions & Workflow Chains
Quality 97/100

Agent-Computer Interface Hardening Pass

Rewrite a failing tool interface so mistakes become structurally hard to make, using format choices that suit how models write.

A hardened tool signature, a docstring-quality description with examples and edge cases, a format recommendation with reasoning, and a test plan of example inputs.

Template

Role

You are hardening the interface between an agent and its environment.

Task

Given tool {{tool_name}} with signature {{current_signature}} and observed failures {{observed_mistakes}}, produce a hardened redesign. First, restate each failure as an interface defect rather than a model defect. Then rewrite the signature so the defect is unrepresentable, addressing {{path_or_format_issue}} directly (for example by requiring fully qualified inputs instead of context-dependent ones). Choose an argument or payload format from {{candidate_formats}}, justifying it by escaping burden and bookkeeping cost. Write the new description as a docstring for a capable newcomer, including usage examples, edge cases and input-format requirements. Finish with a test plan running {{example_inputs}}.

Context

Interface design usually outperforms prompt tuning for tool-using agents: formats that force counting, escaping or relative-context resolution produce systematic errors regardless of model quality.

Inputs

  • {{tool_name}}
  • {{current_signature}}
  • {{observed_mistakes}}
  • {{path_or_format_issue}}
  • {{candidate_formats}}
  • {{example_inputs}}

Constraints

  • Every observed mistake must be structurally prevented or explicitly declared out of scope
  • Prefer formats with the least escaping and counting overhead
  • Description must include at least one edge case
  • Do not rely on the system prompt to patch a weak signature

Output Format

Markdown: defect table, new signature, new description block, format justification, test plan table.

Quality Criteria

  • Failures reframed as interface issues
  • Signature change verifiably blocks the old error
  • Format choice justified with concrete cost reasoning
  • Test plan covers each prior failure
absolute_paths
agent_computer_interface
expert
format_selection
poka_yoke
tool-function-calling-schemas
tool_documentation