بنقرة واحدة
debug-tool
Debug a malfunctioning MCP tool — trace the full request lifecycle to find the issue
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
القائمة
Debug a malfunctioning MCP tool — trace the full request lifecycle to find the issue
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
استنادا إلى تصنيف SOC المهني
Scaffold and implement a new MCP tool end-to-end — endpoint, handler, registration, docs
Structured bug fix workflow — find issue in tracker, root-cause, fix, test, verify, document
Guided npm publish workflow — version bump, quality gate, build, publish, tag
Post-task retrospective — captures what worked, what went wrong, writes lessons to auto-memory
Review code for bugs, MCP protocol violations, consistency issues, and convention adherence
Update documentation after tool changes — TOOLS.md, skill.md, README, INSTALLATION.md
| name | debug-tool |
| description | Debug a malfunctioning MCP tool — trace the full request lifecycle to find the issue |
| argument-hint | [tool-name and symptom description] |
Debug the tool issue: $ARGUMENTS
Do NOT guess. Trace systematically.
Read the code for each layer and check for issues:
src/tools/<category>/<tool>.ts)name in the tool definition the same as the routing name in index.ts?inputSchema match what the handler actually reads from args?required fields correctly listed?enum values complete?getApiKey(args) called correctly?String(), Number())src/lib/endpoints.ts)/api/mcp/${projectId}/...)projectId being destructured out before building query string?console.error)src/lib/request.ts)Content-Type: application/json being set?{ success, data } wrapper or direct data?response.ok being checked?Once you've identified the suspect layer:
endpoints.ts, check the API docs or compare with working toolsnpm run typecheck && npm run lintdocs/TOOLS.mdconsole.error debug lines| Symptom | First place to check |
|---|---|
| "Unknown tool" | Tool not in tools array or missing routing in index.ts |
| "Missing PAT" | getApiKey not receiving args, or env var not set |
| 404 from API | Wrong URL in endpoints.ts — check path and projectId placement |
| Empty response | API returns wrapped { data } but handler reads top-level |
| Wrong data | Query params not being passed — check buildQueryString input |
| Type error | Missing .js in import, or wrong param types |
| Crashes on startup | Circular import or top-level await issue |