Debug broken tool calls
Goal: Debug MCP/plugin tool failures with a calm checklist—stop and keep the receipt before mash-retry.
Best for: when the model says the tool failed, timed out, or returned empty.
MCP (Model Context Protocol) is a common way apps expose tools to models. When a tool call breaks, read the error like a receipt: which tool, which argument, which message.
Beginners: copy the error text into a new chat and ask for a plain-language explanation—then fix one thing.
Broken tool calls are usually permissions, names, or stale servers—not “fix MCP/plugin tool failures with a calm checklist” Shrink the ask; read the error; retry one change at a time.
Why beginners skip this
Switching models when a tool call fails feels tidy—the real cause is permissions, schema, or path. Read the log first.
Step 1 — Capture the receipt
Stop when the tool name mismatches: list available tools, pick the closest read-only search—never invent a name.
Explain this tool error in plain words for a beginner.
Error:
[paste]
Say: what failed · likely cause (auth, args, network, permission) · first fix to try.
Example
Filled prompt
Tool call failed: "permission denied: calendar.write". I only wanted to list events. Write a debug checklist (6 steps) and a safer retry prompt that requests read-only list for next 7 days.
What good output looks like
- Read/draft preferred over write for “fix MCP/plugin tool failures with a calm checklist”
- Ask-every-time on leave-the-system tools
- Kill-switch owner named
- Pass/fail: dry-run only today
Step 2 — Binary-search the cause
Paste the full error (redacted) and ask how to fix; mashing retry leaves duplicate side effects.
Design a 4-step binary-search plan for this failure (one change per step).
Context: [paste]
Example
Filled prompt
Error: tool timeout 30s on drive.search; yesterday we widened write scope.
Run 6-step checklist once. Log error, hypothesis, one next test. No spam retry.
What good output looks like
- Ask-every-time on leave-the-system tools
- Kill-switch owner named
- Pass/fail: dry-run only today
- Read/draft preferred over write for “fix MCP/plugin tool failures with a calm checklist”
Step 3 — Fix instructions, not just the moment
If wrong args keep happening, put the correct call example into skill/agent instructions—do not only patch this session.
From this successful call, write a tiny “how to call this tool” example for our skill docs.
Success log: [paste]
Example
Filled prompt
Successful list(folder=AI-Sandbox) → docs example with correct args.
Context: live job for mcp-debug-broken-tool-calls — “fix MCP/plugin tool failures with a calm checklist” Keep never-invent / draft-only.
What good output looks like
- Walks checklist once, top to bottom
- Ties timeout to a scope or size hypothesis
- One next test only—no spam retry
- Log line with error text quoted
Save this card
Card: On tool failure: stop, keep the receipt, change one variable—no mash-retry. Keep this beside the tool; read before you start.
Before you start
Open the MCP connect screen. Prefer official/verified. For “fix MCP/plugin tool failures with a calm checklist instead o,” plan read-first scopes and ask-every-time on writes Guide: mcp-debug-broken-tool-calls Keep the live artifact visible the whole time. If you only have a blank box, stop and fetch the real job first
How to use this week
This week for one real failed call write three lines: request, response, which of permission/schema/path was wrong; fix, then retry.
Close the week by quoting aloud the refuse line you actually used once. If you cannot, rerun Practice now and date the pass/fail (Asia/Shanghai).
One variable retry
Change scope or tool name—not both—then retry once. Spam creates duplicates.
Ship the practice
Close the tab only after Practice now is done on a real artifact.
Do not bookmark-only
Finish Practice now, then tick this guide on your path. Titles unread are not skills.
Close the loop
Write one line: next time I switch models on failure with no log, I refuse.
Read the error twice
Copy the exact error string into your log before you retry. “Permission denied” and “unknown tool” need different next moves—guessing wastes the retry budget.
Red flag
Mash-retry on tool-name errors; changing three variables at once—stop, list tools, change one.
Pitfalls
| Pitfall | Fix |
|---|---|
| Retry spam | One change per try |
| Ignoring auth expiry | Reconnect first |
| Broadening permissions to “make it work” | Fix args/path first |
Example
Filled prompt
Temptation: skip the habit for mcp-debug-broken-tool-calls to save five minutes.
Job still: fix MCP/plugin tool failures with a calm
Smallest correct pass: Done visible · checkable artifact · Unknowns [?].
Boundaries: draft only; no silent send; no invented metrics.
Return: artifact + refuse-line said aloud.
What good output looks like
- Names the shortcut refused (specific to mcp-debug-broken-tool-calls)
- Still delivers checkable output for “fix MCP/plugin tool failures with a calm”
- Unknowns labeled; draft-only
- Pass/fail: refuse-line dated (mcp-debug-broken-tool-calls #4)
Practice now
Clock the fail: timestamp Asia/Shanghai on first fail (Asia/Shanghai).
Minimal repro tool: smallest args that still fail (Asia/Shanghai).
Arg-diff drill: compare last good args vs failing args in a two-column note (Asia/Shanghai).
Error-quote drill: paste exact error string into Save before theorizing (Asia/Shanghai).
MCP-debug drill: capture one failing tool call (name + args + error); fix env before blaming the model (Asia/Shanghai).
Thin-spot drill: rewrite the Save card with real nouns from your work (repo, doc, inbox). Generic placeholders fail the drill.
Tonight for one real failure log input, permission, and error in three lines; reproduce before changing args.
Reality check: after Practice now, write one sentence you will refuse next time—and keep it on the Save card dated Asia/Shanghai.
Today card (copy) — mcp-debug-broken-tool-calls: 1. Artifact I will produce: ___ 2. Pass/fail check: ___ 3. Refuse-line if tempted to skip verify/send: ___ (date: Asia/Shanghai) 4. One never-do from this guide: ___
Extra pass: do the card on a real file today—reading alone does not count.
Buffer line: name the artifact path you used (Asia/Shanghai).
One sentence takeaway
Fail three lines: request, response, which item wrong; fix, then retry.
Next
调试失败的工具调用
目标: 用一份冷静清单排查 MCP/插件工具失败:先停、留凭证,别连点重试。
适合: 模型提示工具失败、超时或返回空结果时。
工具一失败,把报错当凭证仔细看:哪个工具、什么参数、什么信息。多半是权限、名称或服务器过期,不是「模型变笨了」。缩小请求;读错误;一次只改一处再试。
初学者可以把报错原文粘到新对话,请它用白话解释:然后一次只改一处。
为什么新手跳过
工具调用失败就换模型像省事;真实原因是权限、schema 或路径。先看日志。
步骤 1——留下凭证
工具名对不上就先停:列出可用工具,选最接近的只读搜索,不要编造工具名。
用初学者能懂的白话解释这个工具报错。
报错:
[粘贴]
说明:失败点 · 可能原因(授权/参数/网络/权限)· 先试的第一个修法。
实例
填好的提示词
工具失败:「permission denied: calendar.write」。我其实只要列出事件。写 6 步排查清单,以及更安全的重试提示词:只要未来 7 天的只读列表。
边界:不编造;未知标 [?];只出草稿。
像样的输出大概长这样
- 列出 6 步:核对工具名 → 看权限范围 → 确认只要「读」→ 改提示 → 单次重试 → 记日志
- 明确把 calendar.write 改回只读 list,不要再要写入
- 强调一次只改权限或参数中的一项
- 重试提示只要求「未来 7 天事件列表」
- 如果仍失败,把完整报错贴回对话,禁止空着重试
步骤 2——二分查找原因
复制完整错误原文(脱敏后)再问如何改;连点重试会留下重复副作用。
为这次失败设计 4 步二分计划(每步只改一处)。
背景:[粘贴]
实例
填好的提示词
错误:unknown tool "drive.search_v3"。建议如何列出可用工具并选最接近的只读搜索:不要编造工具名。
边界:不编造;未知标 [?];发送前停下。
完成检查:一分钟内能判过/不过。
像样的输出大概长这样
- 先让模型列出当前会话里真实可用的工具名
- 明确禁止编造 drive.search_v3 这类不存在的名字
- 从列表里挑最接近的只读搜索工具
- 如果没有只读搜索,建议缩小到「列文件夹」再试
- 把选用的工具名写进下一次提示,避免再猜
步骤 3——修说明,不只修这一次
如果总是参数不对,把正确调用例子写进技能/智能体说明;别只修这一次会话。
根据这次成功调用,写一段可放进技能文档的「如何调用该工具」小例子。
成功日志:[粘贴]
实例
填好的提示词
成功的 list(folder=AI-Sandbox) → 文档例子含正确参数。
背景:这是本周真实工作,不是假场景练习。能做到的话:不编造、只出草稿。新手也要能看懂。
边界:不编造;未知标 [?];只出草稿。
像样的输出大概长这样
- 给出可直接粘进技能文档的短示例(含 folder=AI-Sandbox)
- 标出必填参数与常见写错方式
- 注明「成功长什么样」方便以后对照
- 语气像给同事看的操作备忘,不吹不吓
- 提醒:示例只描述已成功调用,不虚构新权限
- 一分钟内能对照清单判过/不过;缺项标红再继续
保存这张卡
记下:本周拒绝的一项权限 + 修好的一次工具报错原文。标上日期。
开始前
先说清本周那件活,以及最小范围(只读 / 草稿 / 写入)。说不清,就先别接。
本周怎么用
本周对一次真失败调用记三行:请求、响应、权限/schema/路径哪一项不对;修好再重试。
单变量重试
要么改范围,要么改工具名:别两个一起改:然后再试一次。连点只会制造重复操作。
把练习做完
用真实材料做完「现在就练一次」,再关标签页。
不要只收藏
先做完「现在就练一次」,再在学习路径上打勾。只收藏不练,标题变不成技能。
闭环
写下一行:下次失败就换模型不看日志,我拒绝。
错误读两遍
重试前把错误原文抄进日志。「权限拒绝」和「未知工具」下一步不一样:乱猜只会浪费重试次数。
红旗
工具调用失败就换模型,真实原因是权限、schema 或路径;先看日志。
常见坑
| 坑 | 改法 |
|---|---|
| 连点重试 | 每次只改一处:权限、路径或参数 |
| 忽略授权过期 | 先重连,再谈别的 |
| 为了「先跑通」盲目放宽权限 | 先修参数或路径;权限最后才动 |
现在就练一次
今晚就练:对一次真失败调用记三行:请求、响应、权限/schema/路径哪一项不对。
一句话带走
失败三行:请求、响应、哪一项不对;修好再重试。
下一步
← Back to home · Learn · Tools · Compare · Start