MCP Error Handler
Including the last working state helps narrow the diagnosis to what changed, dramatically reducing debugging time.
My MCP server "{{server_name}}" is returning the following error:\n\n{{error_message}}\n\nContext:\n- AI tool: {{ai_tool}}\n- Server command: {{server_command}}\n- Config file location: {{config_path}}\n- Last working state: {{last_working_description}}\n\nDiagnose the issue and provide:\n1. Most likely cause\n2. Step-by-step fix\n3. How to verify the fix worked\n4. Preventive measures to avoid this error in the future
Variables to customize
Why this prompt works
Including the last working state helps narrow the diagnosis to what changed, dramatically reducing debugging time.
Save this prompt to your library
Organize, version, and access your best prompts across ChatGPT, Claude, and Cursor.
Related prompts
Forcing the agent to plan before acting prevents premature execution and wasted steps. Explicit dependency mapping enables parallel execution and catches logical gaps early.
Tool Selection AgentThe ReAct pattern (Reason + Act) creates an explicit reasoning trace that improves tool selection accuracy. The error-handling rule prevents infinite retry loops.
Prompt CompressorExplicitly requiring all functional requirements to be preserved prevents the model from over-compressing and losing critical instructions.
Memory Management AgentExplicit memory read/write instructions create agents that improve over time. Categorization keeps memories organized, and the deduplication rule prevents context bloat.