一键导入
tool-design
Activate when designing MCP tools, custom agent tools, or optimizing tool descriptions and parameters for agent consumption.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Activate when designing MCP tools, custom agent tools, or optimizing tool descriptions and parameters for agent consumption.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Activate when an Engineering Manager needs to shape a rough initiative into a clear, scoped, outcome-oriented brief before execution.
Activate when reviewing branches, commits, or pull requests using the emoji-driven review protocol.
Activate when managing conversation history in long sessions, choosing compression strategies, or preserving critical information during context truncation.
Activate when designing agent systems, debugging unexpected agent behavior, or optimizing context usage and attention budgets.
Activate when hitting context limits, experiencing quality degradation in long sessions, or needing to extend effective context capacity.
Activate when generating in-code comments or system documentation using the Diátaxis framework.
| name | tool-design |
| version | 1.0.0 |
| description | Activate when designing MCP tools, custom agent tools, or optimizing tool descriptions and parameters for agent consumption. |
| triggers | ["tool-design","mcp","tool-description","api-design","agent-tools","function-calling"] |
Principles for designing tools that agents can use effectively. Tool descriptions are loaded into agent context and collectively steer behavior — they function as prompt engineering. A well-designed tool reduces the agent's cognitive load; a poorly designed one causes confusion and errors.
Primitive, general-purpose capabilities often outperform sophisticated multi-tool architectures. The filesystem agent pattern uses standard Unix utilities (grep, cat, find, ls) instead of custom exploration tools.
Before: 17 specialized tools, 80% success, 274s avg execution After: 2 tools (bash + SQL), 100% success, 77s avg execution
Replace vague language with precise functionality statements:
Bad: "Helps with file operations" Good: "Read a file from disk. Returns the full content as UTF-8 text. Use this when you need to examine source code, configuration, or documentation. Input: absolute file path. Output: file contents or error message if file doesn't exist."
read_file, search_code, run_testsServerName:tool_nameResearch indicates 10-20 tools works well for most applications. Beyond that:
Error messages should guide agents toward correction, not just report failures:
Bad: Error: invalid input
Good: Error: file_path must be an absolute path starting with /. Received: "src/main.ts". Try: "/home/user/project/src/main.ts"
Use agent interactions to identify failure modes and improve descriptions:
Well-designed tool definition:
{
"name": "search_codebase",
"description": "Search for text patterns in source files using regex. Use this when looking for function definitions, variable usage, import statements, or any text pattern across the project. Returns matching lines with file paths and line numbers. For finding files by name, use list_files instead.",
"parameters": {
"pattern": "Regex pattern to search for (e.g., 'function\\s+handlePayment')",
"file_type": "Optional file extension filter (e.g., 'ts', 'php'). Omit to search all files.",
"max_results": "Maximum results to return (default: 20, max: 100)"
}
}
Problematic tool definition:
{
"name": "search",
"description": "Searches for things in the project",
"parameters": {
"query": "What to search for"
}
}
read_file, search_code, run_testsServerName:tool_namecontext-fundamentals (tool definitions consume context budget)project-development (tool architecture within pipelines), evaluation (testing tool effectiveness)