---
name: ax-tool-design
description: Design or review interfaces that AI agents use (MCP servers and tools, function-calling schemas, agent-facing CLIs and APIs, tool responses and error payloads) against the AX Field Guide's 15 heuristics. Use when building or changing an MCP tool, writing a tool schema or response format, or auditing an agent's tool surface.
---

# Designing tools for agents (AX review)

The AX Field Guide (spektiv.io/field-guide) defines 15 heuristics for interfaces whose user is an AI agent.
This skill turns them into a working method. The full checklists, generated from the articles, are in
[checklists.md](checklists.md): read it before designing or reviewing. Each heuristic links to its article
for the reasoning, examples and trade-offs.

## The 15 laws in one screen

| | Law | Ask of every tool |
|---|---|---|
| H-01 | Continuous State Anchoring | Does every response restate the state the agent needs (target, location, version)? |
| H-02 | Affirmative Null Observations | Does an empty result say what was searched, with what scope and defaults, and where else to look? |
| H-03 | Token Hygiene | Is every token useful for the next decision? Summary first, with a handle to drill in? |
| H-04 | Freshness & Half-Life | Are volatile reads stamped with a version, and are stale writes rejected? |
| H-05 | Interface Priors | Do names, syntax and shapes match what models already know? No misleading names? |
| H-06 | Deterministic Envelopes | Same response shape, naming, pagination and truncation markers across all tools? |
| H-07 | Local Handles & Progressive Disclosure | Short, stable references instead of long IDs or line numbers? Depth on demand? |
| H-08 | Compositional Accelerators | Can the agent filter, batch and compute server-side instead of looping? |
| H-09 | Just-in-Time Micro-Docs | Does each tool carry one tested, copyable example? Deep docs pulled, not pushed? |
| H-10 | Poka-Yoke Boundaries | Are bad arguments rejected inside the call, before anything happens? |
| H-11 | Errors as Steering Prompts | Does every error say what failed, the actual state, and the exact next valid call? |
| H-12 | Blast Radius | Are risk annotations declared, dry runs cheap, and gates only on destructive actions? |
| H-13 | Explicit Trust Boundaries | Is untrusted content marked as data, separate from instructions? |
| H-14 | Memory Metabolism | Can the agent shed debris: compact summaries, handles instead of dumps? |
| H-15 | Temporal Proprioception | Does the agent see counts, budgets and repeats, and must evidence back "done"? |

## Method

1. **Inventory.** List every tool with its name, description, input schema, a real success response,
   an empty response and an error response. You cannot review what you have not seen returned.
2. **Walk the session.** For a realistic task, write the calls an agent would make, phase by phase
   (orient → explore → act → verify → report). Most problems show up as a turn where the agent has to guess.
3. **Run the checklists.** For each heuristic in checklists.md, mark each item pass / fail / n.a. with the
   evidence (the exact field or response). Do the quick "Check" where it applies.
4. **Resolve trade-offs on purpose.** Token Hygiene pulls against State Anchoring and Null Observations;
   the articles' "When laws collide" sections give the usual resolution (e.g. echo scope compactly,
   add heavy hints only on empty results).
5. **Write it down.** Put a short table (heuristic → how the design satisfies it, or why n.a.) next to
   the code or in the PR. Tests should cover the empty, error and unknown-ID paths, not just the happy path.

---

From "Designing for Agents — The AX Field Guide" by Spektiv, https://spektiv.io/field-guide. Licensed under CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/).
