How to Handle MCP Tool Errors So an Agent Can Recover
Learn when an MCP tool should return isError: true, when to return a JSON-RPC error, and how to test which consumer receives each failure.
|
I'm Samuel Fajreldines I am a specialist in the entire JavaScript and TypeScript ecosystem (including Node.js, React, Angular and Vue.js) I am expert in AI and in creating AI integrated solutions I am expert in DevOps and Serverless Architecture (AWS, Google Cloud and Azure) I am expert in PHP and its frameworks (such as Codeigniter and Laravel). |
|
Samuel Fajreldines I am a specialist in the entire JavaScript and TypeScript ecosystem (including Node.js, React, Angular and Vue.js) I am expert in AI and in creating AI integrated solutions I am expert in DevOps and Serverless Architecture (AWS, Google Cloud and Azure) I am expert in PHP and its frameworks (such as Codeigniter and Laravel).
|
6 articles · practical guides & tutorials by Samuel Fajreldines
In-depth AI Systems articles, hands-on guides and tutorials by Samuel Fajreldines — 6 expert posts on AI Systems for software engineers.
Learn when an MCP tool should return isError: true, when to return a JSON-RPC error, and how to test which consumer receives each failure.
Implement an AI-agent tool-call concurrency limit with TypeScript, per-tool pools, cancellation, and tests that catch exceeded slots.
Build an AI agent dry run with a typed plan, side-effect-free preview, argument-bound approval, and revalidation before execution.
Recover an AI agent after a crash without repeating external effects: persist the turn, use a stable operation key, and reconcile unknown outcomes.
Learn when parallel tool calls are safe in an AI agent, when dependencies or shared state require serialization, and how to test the runtime policy.
Version AI agent tools safely: pin the contract per run, adapt old payloads, and reject unknown versions before executing external side effects in production.