Introduction¶
When connecting tools for an Agent, common pain points revolve around “whether it can be called through,” rather than the model frequently selecting the wrong tool, mismatched parameters, or errors that are just a single error. These issues often stem from vague descriptions, names that don’t reveal behavior, and errors that don’t guide the next step—the essence is treating the tool as a regular function, not as a contract that the model will read.
Below introduces the Tool Design Principles on SkillHub (@kunlungrowth/kg-tool-design). It uses a verifiable workflow and ToolSpec output specification to converge naming, description, error recovery, and MCP integration into a single standard.
What is this¶
Tool Design Principles is an Agent Skill (enterprise source) published by Kunlun Growth on SkillHub, version 1.0.0, coordinate @kunlungrowth/kg-tool-design, category ai-agent. The official one-sentence positioning is: design tools as contracts, covering naming, description, errors, and MCP integration specifications.
The Skill itself is based on the generic SKILL.md format, with metadata marked requires_api_key=false, and does not depend on an extra API Key when enabled. The SkillHub page shows a score of 100000, downloaded 730 times, and installation count 0 (as of page scraping, there is no statistically significant installation feedback from the community side).
Core Capabilities¶
The Skill body writes the role goal of the Agent Tool Designer very clearly: tools are the boundary between the Agent and the external environment; names, descriptions, and error semantics determine whether the model can stably use capabilities, with the goal of reducing tool confusion and context failure.
Verified capabilities and workflows include the following sections.
Contractual Design and Consolidation Principles¶
- Treat every tool as a “contract: given X input, return Y output, and give Z signal on failure.”
- Follow Consolidation (Consolidation Principle): Merge semantically similar operations that are frequently called consecutively into a single parameterized tool, using parameters to distinguish modes rather than piling up a large number of fragmented tools.
Three-Part Tool Description¶
Descriptions must answer three things:
- What: A sentence explaining the capability boundary, avoiding vague verbs like “process” or “manage.”
- When: Applicable scenarios and scenarios that should clearly not be used.
- Returns: Success return structure, field meanings, and possible failure signals.
Actionable Errors and Naming / MCP Specifications¶
- Errors need to be actionable: Specify the cause and next step (change parameters, change source, retry), rather than just returning “failed.”
- Naming uses Verb-Noun (e.g.,
search_web,read_file). - MCP tools are exposed as
ServerName:tool_name(e.g.,github:create_issue), avoiding cross-service name conflicts.
Large Output and Auditing¶
- For large results, it is recommended to return “summary + file path,” leaving details to the accompanying
filesystem-contexttype Skill for local disk retrieval (Skill cross-references; you need to install the corresponding Skill yourself to use it in series). - Built-in Tool Audit Checklist (
references/template.md) for checking naming, descriptions, errors, consolidation, and large output policies item by item.
Structured Output ToolSpec¶
At the end of the workflow, a ToolSpec artifact is produced. Fields include: name, mcp_server, description (what/when/returns), parameters, errors (including code, message_template, recovery), consolidates, large_output_policy. It also includes improvement suggestions and audit hits regarding naming, descriptions, and errors.
The applicable boundaries declared by the Skill: file-level overflow storage is handed to filesystem-context; multi-agent topology is handed to multi-agent-patterns; pure prompt compression is handed to context-optimization—this Skill is only responsible for the tool interface layer.
Installation and Enablement¶
First, confirm that SkillHub CLI is installed on the local machine; if not installed, you can follow the official installation instructions (full installation or CLI only):
command -v skillhub && skillhub --version
# If not installed (full installation, recommended)
curl -fsSL https://skillhub-1388575217.cos.ap-guangzhou.myqcloud.com/install/install.sh | bash
When installing this Skill, you must use --dir to point to the current Agent’s skills directory, otherwise installing by default to ./skills/ may not be recognized:
skillhub install @kunlungrowth/kg-tool-design --dir <skills 目录>
Common skills directories for various environments (from SkillHub official installation documentation):
| Environment | skills Directory |
|---|---|
| Cursor | ~/.cursor/skills/ |
| Claude Code | ~/.claude/skills/ |
| Codex | ~/.codex/skills/ or .agents/skills/ in the project |
After installation, you usually need to restart or open a new Agent session; specifics depend on your client’s Skill loading mechanism. The SkillHub page also suggests referring to: https://skillhub.cn/install/skillhub.md.
Typical Usage¶
The official SKILL.md provides a reform example for comparison: the original tool was named process(data), the model frequently passed parameters incorrectly, and the error was just error.
After enabling this Skill, you can input the above problems, and the Agent will produce selected results according to the Skill workflow, for example:
- Rename to
summarize_document, MCP belongs todocs, exposed name isdocs:summarize_document. - Fill in the three-part description: What is long text summary; When restricts long text overview scenarios and excludes text shorter than 500 words; Returns explains
{summary, tokens_saved}and structured failure. - Change the error to an actionable format, for example:
{
"code": "EMPTY_INPUT",
"message_template": "输入为空,请提供非空文档文本后再调用。",
"recovery": "检查上游是否成功取到文档内容。"
}
- Compare with the audit checklist in
references/template.mdand mark corrected items (vague naming, non-actionable errors, missing When boundaries, etc.).
In actual projects, you can also hand “existing tool list + MCP service list + error log snippets” to the Agent at once, asking it to output a complete ToolSpec and improvement suggestions.
Applicable Scenarios and Notes¶
Who is it for:
- Developers who are adding or refactoring functions/APIs/MCP tools for an Agent.
- Teams that have online issues like “using the wrong tool” or “cannot understand the return value” and need systematic rectification based on descriptions and error semantics.
- Scenarios where there are too many tools, system prompts are bloated, and the tool set needs to be converged according to the consolidation principle.
Things to Note:
- SkillHub statistics show an installation count of 0. When selecting, please refer to the Skill body and self-evaluation in the templates, rather than assuming there is a large amount of community practice validation.
- The
filesystem-context,multi-agent-patterns, etc., cited in the text are all other Skills. This package only containsSKILL.mdandreferences/template.md. Cross-capabilities require you to install the corresponding Skills yourself. - The “write to disk + summary” strategy for large outputs depends on whether the runtime environment has file writing and retrieval capabilities; it should be tested on the target Agent before integration.
ToolSpecis a design artifact. Storing it in a database or generating real MCP server code still requires your engineering steps; the Skill does not replace implementation and testing.
Conclusion¶
The value of Tool Design Principles lies in turning the slogan “tools as contracts” into an executable seven-step workflow, an auditable checklist, and a unified ToolSpec output. If you are integrating MCP or custom Agent tools, you can first install it to the local skills directory, take a real tool with vague naming and dry error messages, go through the official example, and then decide whether to incorporate it into your team standards.
Official page: https://www.skillhub.cn/skills/kunlungrowth/kg-tool-design
API coordinate: https://api.skillhub.cn/kunlungrowth/kg-tool-design