Tool Design and Contracts

Tool Definition Patterns

A tool definition is the interface contract between an agent and the external world: it includes a name, a description the model reads to decide when to call it, and a typed parameter schema that constrains what the model can pass in. The most common failure mode is vague descriptions: a tool named "search" with the description "searches for things" will be invoked incorrectly far more often than one named "search_codebase_by_symbol" that specifies exactly what it searches and what format results take. Every agent system depends on tool definitions to bridge language understanding and real-world action, so investing in precise names, descriptions, and parameter constraints pays back through fewer misrouted calls and more reliable end-to-end behavior.