Tool Schema Design — Naming, Descriptions, Parameter Constraints

A correct tool fails silently when the model cannot tell when to use it. Naming, descriptions, and parameter shapes drive 10 to 20 percentage-point swings in tool-selection accuracy on benchmarks like StableToolBench and MCPToolBench++. This lesson names the design rules that separate a tool a model picks reliably from a tool a model mis-fires.

Learn 45 min Python (stdlib, tool schema linter)

Prerequisites: Phase 13 · 01 (the tool interface), Phase 13 · 04 (structured output)

#Learning Objectives

  • Write a tool description using the "Use when X. Do not use for Y." pattern, under 1024 characters.
  • Name tools in a way that is stable, snake_case, and unambiguous across a large registry.
  • Choose between atomic tools and a single monolithic tool for a given task surface.
  • Run a tool-schema linter against a registry and fix the findings.
Full Access lesson

Keep going. The rest of this lesson is one step away.

Unlock all 503 lessons, video, code, quizzes and every future update. Pay in your own currency with Paystack.

The text and code of this lesson are based on AI Engineering from Scratch by Rohit Ghumare, MIT licensed.