tool-calling-tutor

Featured

Use when a tool-calling agent does not call a tool, sends wrong arguments, loops without stopping, or needs a function schema. Guides a four-branch diagnosis and five-step schema repair. Do not use for framework-specific, MCP-server, or production-observability questions.

AI & Automation 6,769 stars 924 forks Updated today MIT

Install

View on GitHub

Quality Score: 93/100

Stars 20%
100
Recency 20%
100
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
50
License 10%
100
Description 5%
100

Skill Content

# Tool Calling Tutor You are now in the **tool-calling debugging** context. The user is building an agent that calls functions / tools, and something isn't working. Your job is to walk them through diagnosis + fix, not to write code for them. ## Step 1 — Triage(first thing you do) When the user mentions tool calling problems, first infer the route from an explicit symptom and briefly confirm it. Ask one multiple-choice question only when the symptom is not explicit: 1. **(a) LLM 不呼叫我的 tool** — 模型直接用自然語言回答、完全沒觸發 tool_calls 2. **(b) Tool 被呼叫、但參數錯** — 呼叫對 tool,但 `arguments` 不對(型別錯、缺欄位、值不合理) 3. **(c) ReAct loop 跑不停 / 漏步** — 多步 loop 無限循環,或者中間漏一個 tool 沒呼叫 4. **(d) 我從零開始、還沒寫 schema** — 用戶要新做一個 tool、想知道 schema 怎麼設計 明確的症狀不用重問;確認你推定的 route 後直接繼續。每個 branch 走的 reference 不同。 ## Step 2 — Branch by symptom ### (a) LLM 不呼叫 tool → 看 description 與工具邊界 先檢查這 3 項: 1. **`description` 太籠統**:寫的是「處理資料 / Convert a value / Search things」這種給人讀的 docstring,LLM 看不到「這個 tool 解什麼具體問題」。看 [debug-flowchart.md](${CLAUDE_SKILL_DIR}/references/debug-flowchart.md) Section A。 2. **多 tool 邊界互相重疊**:兩個 tool 的 description 都能套到 user query、LLM 選不出來、乾脆都不選。 3. **問題本身用不到 tool**:user query 是「介紹一下 Python」這種純知識題、tool list 裡也沒適合的、LLM 直接純文字回答是正確的。 **怎麼修**:把 `description` 從「**做什麼**」改寫成「**何時用**」。對照 [schema-evolution.md](${CLAUDE_SKILL_DIR}/references/schema-evolution.md) 的 bad → good A/B。 ### (b) Tool 被呼叫、但參數錯 → 看 parameters schema 先檢查這 3 項��� 1. **參數型別全用 `string`**:`{"value": {"type": "string"}}` LLM 不知道要傳 number。改成 `{...

Details

Author
WenyuChiou
Repository
WenyuChiou/awesome-agentic-ai-zh
Created
4 months ago
Last Updated
today
Language
Python
License
MIT

Similar Skills

Semantically similar based on skill content — not just same category

AI & Automation Listed

design-agent-tools

Designs or repairs the tool interface an agent programs against - names, descriptions, JSON schemas, response formatting, and error messages. Use when an agent picks the wrong tool, ignores a tool, passes bad arguments, blows up its context on tool output, or repeats calls. Also use when adding new tools, converting REST endpoints into agent tools, or reviewing an MCP server's tool surface.

0 Updated 3 weeks ago
ysz7
AI & Automation Featured

agent-tool-builder

Tools are how AI agents interact with the world. A well-designed tool is the difference between an agent that works and one that hallucinates, fails silently, or costs 10x more tokens than necessary. This skill covers tool design from schema to error handling. JSON Schema best practices, description writing that actually helps the LLM, validation, and the emerging MCP standard that's becoming the lingua franca for AI tools. Key insight: Tool descriptions are more important than tool implementa

30,590 Updated today
davila7
AI & Automation Listed

agent-tool-builder

Tools are how AI agents interact with the world. A well-designed tool is the difference between an agent that works and one that hallucinates, fails silently, or costs 10x more tokens than necessary. This skill covers tool design from schema to error handling. JSON Schema best practices, description writing that actually helps the LLM, validation, and the emerging MCP standard that's becoming the lingua franca for AI tools. Key insight: Tool descriptions are more important than tool implementa

0 Updated today
qepilot