Tool use design
Skill Amey-Thakur/AI-SKILLS/skills/llm-engineering/tool-use-design
Design LLM tools with descriptions that steer, granularity that composes, and error returns the model can act on. Use when building agent tool sets or debugging wrong-tool and wrong-argument failures.From its SKILL.md
npx -y skills add Amey-Thakur/AI-SKILLS --skill tool-use-designAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
2 things to look at
- 23 days oldThe repository was created 23 days ago. New is not bad, but a brand new repository carrying a familiar-sounding name is the shape a typosquat arrives in, and there has been no time for anyone else to find a problem with it.
- 4 stars4 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.
SKILL.md
3.6 KB, 800 tokens by cl100k_base, as published. Nobody here has run it
Tool use design
The model chooses tools by reading their descriptions and recovers from failures by reading their errors. Both are prompts wearing API clothing: write them for the model as carefully as you write the system prompt.
Method
- Describe when, not just what. Each tool's description states what it does, when to reach for it, and when not to ("search internal docs; use for company-specific questions; do not use for general knowledge"): the model's tool-selection errors trace to descriptions that only name the mechanism. Disambiguate overlapping tools explicitly in both descriptions, or merge them.
- Size tools at task granularity. One tool per
coherent capability (
search_orders,refund_order), not one per REST endpoint (forcing the model to orchestrate your API's accidents) and not one mega-tool with amodeargument (hiding the real choice inside a parameter). The test: can the model achieve common goals in 1-3 calls? (see api-design's consumer-first ethic: the model is the consumer). - Design parameters for a language model. Few, named plainly, enums over free strings, defaults for the optional, descriptions with examples and formats ("ISO date, e.g. 2026-07-20"): every parameter description is instruction text (see structured-output's schema rules: same discipline, the arguments are structured output). Validate arguments server-side like any untrusted input (see request-validation): the model will eventually send the impossible.
- Return errors the model can act on. "date_range
exceeds 90 days: split into smaller ranges" beats
400 Bad Request: the error message is the model's recovery prompt (see error-messages, applied to a new reader). Distinguish retryable from permanent in words; include what was valid so the model does not discard correct arguments while fixing the wrong one. - Bound the blast radius. Tools that mutate carry the automation-guardrails posture: least-privilege credentials per tool (see iam-design), dry-run or confirmation steps for destructive actions (the model proposes, the human or a policy layer approves), idempotency on everything retryable (see idempotency-keys: the model will retry), and audit logs of every call with arguments (see audit-logging, llm-observability).
- Evaluate tool use as its own suite. Cases for: right tool chosen (including "no tool" cases: over-calling is a failure mode), arguments correct, errors recovered, multi-step compositions completing (see llm-eval-design); log production tool-call traces and mine the failures back into the suite. Tool description edits are behavior changes: they go through the eval gate like prompt edits.
Boundaries
- More tools degrade selection: past a few dozen, group/namespace them or gate by context (progressive disclosure; the api-surface-minimalism instinct). A tool nobody's eval shows being chosen correctly is surface area without value.
- Long tool results are context spend: return the decision-relevant slice with pagination/handles for the rest (see context-window-management step 4).
- The security boundary is the tool implementation, never model politeness: prompt-injected instructions will reach your tools, and only server-side authz and validation stand between them and your data (see llm-guardrails, authz-design).
What ships with it
Read from the repository
Just SKILL.md. No reference files, no scripts.
Gives 0 of the 12 instructions most design frontend skills give in 800 tokens
Counted across 1,169 of the 1,878 authors here whose files we hold, read 2026-08-07
- Use CSS variables for color consistencyin 72 of 1169, across 23 files
- Commit to one bold aesthetic direction before codingin 72 of 1169, across 27 files
- Match implementation complexity to the aesthetic visionin 70 of 1169, across 20 files
- Add atmospheric background effects and texturesin 57 of 1169, across 9 files
- Use unexpected spatial compositions and layoutsin 56 of 1169, across 8 files
- Implement real working codein 55 of 1169, across 7 files
- Vary themes and aesthetics across different designsin 48 of 1169, across 7 files
- Launch chromium in headless modein 47 of 1169, across 4 files
- Close the browser when donein 47 of 1169, across 4 files
- Run provided scripts with help flag firstin 47 of 1169, across 4 files
- Wait for network idle statein 47 of 1169, across 4 files
- Use descriptive selectors for elementsin 47 of 1169, across 4 files
Said here and by no other author read
- State when to use and not use each tool
- Disambiguate overlapping tools or merge them
- Size tools at task granularity
- Make common goals achievable in few calls
- Use plain names and enums over free strings
- Provide parameter descriptions with examples
Grouped from the skills themselves: near-identical wordings counted once, and counted by distinct author, so one author publishing three of these counts once. Length counted with cl100k_base; the agent that loads this file may tokenize it differently.