Skip to slide
Chapter 3 · Tool Design
19 / 191

CHAPTER 03 · Tool Design · 3 / 11

Granularity: how big should a tool be?

A central design question is tool granularity: too fine and the model drowns in calls; too coarse and it can't express what it needs.

  • Too granular: open_file, read_line, close_file forces the model to orchestrate plumbing. Prefer read_document.
  • Too coarse: a single do_everything tool with a giant polymorphic schema confuses the model about what it can actually do.
  • Right-sized: each tool maps to one meaningful user-level action. "Read a document," "search case law," "generate a document," "edit a document."

A good test: each tool should correspond to a verb a user would recognise. If you can't describe the tool in one clear sentence, it's probably mis-sized (i couldn't find a better word🥲).

← → arrow keys work too