tool-design

tool-design is a skill for Claude Code, Codex from agentailor/create-mcp-server. It costs 135 tokens per session (2,746 once invoked), scanned A, a copy of tool-design, Apache-2.0.

A guide to designing and checking tools that AI agents call, including MCP servers, function definitions, and ordinary functions. It explains how to make tool names, inputs, outputs, errors, and data limits clear to an unpredictable caller.

In plain words
What is it for?
Use it when creating, splitting, reviewing, or repairing an agent tool in TypeScript, Python, or another language.
Why use it?
It reduces wrong tool choices, malformed parameters, repeated failed calls, and responses so large that they overwhelm the agent's available context.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it when creating, splitting, reviewing, or repairing an agent tool in TypeScript, Python, or another language.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/agentailor/create-mcp-server/tool-design
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add agentailor/create-mcp-server --skill tool-design
Clone the repo
git clone --depth 1 https://github.com/agentailor/create-mcp-server

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for tool-design

README.md
[![agentmods](https://agentmods.dev/badge/skills/agentailor/create-mcp-server/tool-design/github.svg)](https://agentmods.dev/skills/agentailor/create-mcp-server/tool-design)
Your own site
<a href="https://agentmods.dev/skills/agentailor/create-mcp-server/tool-design"><img src="https://agentmods.dev/badge/skills/agentailor/create-mcp-server/tool-design/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for tool-design

Your own site · 80×15
<a href="https://agentmods.dev/skills/agentailor/create-mcp-server/tool-design"><img src="https://agentmods.dev/badge/skills/agentailor/create-mcp-server/tool-design.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 135 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,746 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin 100% copy Near-identical to another mod in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00135 $0.02746
Opus 5.5 $0.00054 $0.01098
Sonnet 5 $0.00027 $0.00549
Haiku 4.5 $0.00014 $0.00275

Measured 3d ago against content hash 62bb946ae5a1, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-23, from the pricing page.

Security

Grade A, and why

tool-design scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 3d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

Origin

This is a copy

100% identical to tool-design — 214 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.

src/assets/skills/tool-design/SKILL.md · 108 lines

How it starts

The opening of the file, as written. The whole thing — 108 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Tool Design

Overview

A tool is a contract between a deterministic system and a non-deterministic caller. A normal API assumes a rational developer who reads the docs, handles error codes, and knows which endpoint to call. An agent breaks all of those assumptions: it may pick the wrong tool because two names look alike, pass malformed parameters despite a clear schema, pull back a dataset that blows its own context window, or misread a cryptic error and retry the same failing call.

So tools for agents are designed defensively: clear enough that the agent can't easily misuse them, informative enough to steer the agent toward a better next move, and lean enough to spend the context window carefully.

The payoff: agent and human ergonomics align. A tool that an agent uses well is almost always a tool a human finds intuitive too. Designing for a non-deterministic caller just produces a better API.

None of this is framework- or language-specific. The same five principles apply whether the tool is an MCP server tool, a LangChain/LangGraph tool, an OpenAI/Anthropic function-calling definition, or a plain function exposed to a model — and whether it's written in TypeScript, Python, or anything else. What varies is the syntax of name / description / parameters / returns; the design thinking does not. See references/examples.md for the same tool proven across languages and surfaces.

The Five Principles

Apply these when writing or reviewing any tool. The deep dive with worked schema shapes is in references/principles.md.

1. Strategic selection

Build tools around user workflows, not database schemas or API endpoints. Don't wrap every endpoint as its own tool — the agent then struggles to choose among near-duplicates and you spend prompt budget documenting all of them. Consolidate related operations into one well-parameterized tool when it maps to how a user thinks about the task.

Read the full file on GitHub · 108 lines

Files

What ships with it

3 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 3d ago First seen · 108 lines · 135 tokens per session scan A 62bb946ae5a1

Subscribe to this mod's changes

tool-design is a skill published in the GitHub repository agentailor/create-mcp-server (14 stars, last pushed 4d ago), licensed Apache-2.0. It adds 135 tokens to every session and 2,746 once invoked, about $0.0005 per session on Opus 5.5. A static security scan graded it A with 0 findings. It is 100% identical to tool-design, differing in 214 lines, and is treated as a copy.