> Markdown version of [/videos/100713-what-i-got-wrong-shipping-an-mcp-server-for-live-infrastructure](https://www.wearedevelopers.com/videos/100713-what-i-got-wrong-shipping-an-mcp-server-for-live-infrastructure). Every page supports `.md` or `Accept: text/markdown`. Links point to the HTML versions so they work for humans too. Agent guide: [/agents.md](https://www.wearedevelopers.com/agents.md). --- # What I Got Wrong Shipping an MCP Server for Live Infrastructure A simple refund request turned into a mass cancellation when an LLM guessed the wrong tool. See how Harness consolidated 250 resources into 11 to stop destructive AI hallucinations. - **Speakers:** [Pritesh Kiri](https://www.wearedevelopers.com/@pritesh-kiri) - **Event:** Conference India 2026 - **Published:** November 25, 2026 - **Duration:** 31:32 - **URL:** https://www.wearedevelopers.com/videos/100713-what-i-got-wrong-shipping-an-mcp-server-for-live-infrastructure - **Thumbnail URL:** https://customer-goifxnzhrq3d0d54.cloudflarestream.com/03cc362c1b2bc5b66ce8cd1ca0dfe33b/thumbnails/thumbnail.jpg?time=30000ms ## Summary When AI agents gain the ability to execute destructive operations, relying solely on basic tool descriptions creates severe operational risks. Pritesh Kiri from Harness uses a customer support case study to illustrate how an unguarded Model Context Protocol (MCP) server can misinterpret ambiguous prompts. Without proper constraints, a failed tool call prompts the LLM to guess the next closest tool—turning a simple refund request into an unauthorized voided transaction and a mass cancellation for the wrong customer. Preventing these failures requires maturing the MCP architecture across five core pillars. First, tool descriptions must explicitly define expected outputs, provide examples, and instruct the agent to pause and ask when encountering ambiguity. Second, rather than returning generic HTTP status codes, error responses must explain why an action failed, whether it is retryable, and what to do next. Third, engineers should optimize tool granularity: "merge by intent" to abstract similar endpoints into parameterized tools—just as Harness consolidated 250 resources into 11—and "split by blast radius" to isolate high-risk bulk actions. Finally, destructive tools require a human-in-the-loop plan, confirm, and apply pattern alongside strict SSO session scoping and multi-tenant isolation. By converting production incidents into an automated evaluation suite, engineering teams can continuously test prompt and model changes to prevent regressions before shipping. **Keywords:** MCP server architecture, LLM tool calling, destructive tool guardrails, tool granularity optimization, context-rich error handling, human-in-the-loop confirmation, multi-tenant context isolation, agent evaluation suites, blast radius reduction, Harness open source MCP, ambiguous prompt resolution, session-scoped API authorization, AI agent recovery patterns ## Chapters 1. **Introduction and case study of an internal support MCP** (00:02) — Manual customer support workflows across multiple tabs create bottlenecks that an internal Model Context Protocol server can streamline through a single chat interface. 1. **Analyzing cascading tool call failures in production** (08:01) — Ambiguous user prompts combined with uninformative HTTP error codes cause LLM agents to guess parameters and execute destructive fallback tools on the wrong records. 1. **Writing explicit tool descriptions to prevent agent guessing** (12:57) — Vague tool descriptions lead to incorrect entity selection, which can be prevented by explicitly instructing the agent when to use a tool, what output to expect, and when to ask for clarification. 1. **Structuring actionable error messages for LLM recovery** (15:17) — Generic status codes force agents to blindly try alternative tools, whereas structured error payloads with retry flags and next steps enable intelligent recovery. 1. **Optimizing tool granularity by intent and blast radius** (17:56) — Exposing hundreds of individual API endpoints overwhelms the model, requiring engineers to merge similar tools by intent while splitting destructive actions by blast radius. 1. **Implementing human-in-the-loop confirmations for destructive tools** (21:14) — High-impact operations risk severe data loss if executed automatically, necessitating a three-step plan, confirm, and apply pattern to keep a human in the loop. 1. **Enforcing scoped authentication and multi-tenant isolation** (22:44) — Shared admin tokens expose systems to unauthorized actions, which is mitigated by passing SSO session identities to enforce role-based limits and tenant isolation. 1. **Building continuous evaluation suites from production incidents** (24:29) — Changes to models or tool descriptions can introduce regressions, making it essential to convert production incident traces into continuous evaluation gates before shipping. ## Related Moments - [Improving AI agent accuracy with tool descriptions](https://www.wearedevelopers.com/videos/100628-humans-in-the-loop-storytelling-in-tech) (from "Humans in the Loop: Storytelling in Tech") - **Thumbnail URL:** https://customer-goifxnzhrq3d0d54.cloudflarestream.com/ed95072ad1c568808f6c82aa629df38b/thumbnails/thumbnail.jpg?time=3635133ms - [Evaluating unguided agent tools against context-aware investigation pipelines](https://www.wearedevelopers.com/videos/100308-beyond-chat-ai-workflows-that-actually-investigate-alerts-so-you-don-t-have-to-know-everything) (from "Beyond Chat: AI Workflows That Actually Investigate Alerts (So You Don't Have To Know Everything)") - **Thumbnail URL:** https://customer-goifxnzhrq3d0d54.cloudflarestream.com/b9f46359dae2530d2340999097a11eaf/thumbnails/thumbnail.jpg?time=107920ms - [Identifying enterprise risks in scattered MCP servers](https://www.wearedevelopers.com/videos/100336-from-apis-to-mcp-enterprise-governance-registry-and-controls) (from "From APIs to MCP: Enterprise Governance, Registry, and Controls") - **Thumbnail URL:** https://customer-goifxnzhrq3d0d54.cloudflarestream.com/092f9a4b11b7d4aa142ac3f734afacba/thumbnails/thumbnail.jpg?time=115680ms - [Understanding the technical structure of an MCP server](https://www.wearedevelopers.com/videos/1392-mcp-mashups-how-ai-agents-are-reviving-the-programmable-web) (from "MCP Mashups: How AI Agents are Reviving the Programmable Web") - **Thumbnail URL:** https://customer-goifxnzhrq3d0d54.cloudflarestream.com/01fc4500804dc60d3c14f3db02978ac1/thumbnails/thumbnail.jpg?time=230995ms - [Four core pillars of agent harness control](https://www.wearedevelopers.com/videos/100703-antigravity-agent-harness) (from "Antigravity & Agent Harness") - **Thumbnail URL:** https://customer-goifxnzhrq3d0d54.cloudflarestream.com/081c30a384c5ccfc4e24a9d283f45bee/thumbnails/thumbnail.jpg?time=30000ms - [Securing agent memory, MCP servers, and OWASP top ten](https://www.wearedevelopers.com/videos/100722-from-agentic-ai-to-enterprise-ready-building-agents-that-scale-secure-and-deliver) (from "From Agentic AI to Enterprise Ready: Building Agents That Scale, Secure and Deliver") - **Thumbnail URL:** https://customer-goifxnzhrq3d0d54.cloudflarestream.com/f90c2c77d0b90658acb82180354bf263/thumbnails/thumbnail.jpg?time=30000ms ## Related Articles - [Everything a Developer Needs to Know About MCP with Neo4j](https://www.wearedevelopers.com/magazine/604-everything-a-developer-needs-to-know-about-mcp-with-neo4j) - [Infer Once, Run Everywhere: Zero-Token Architecture](https://www.wearedevelopers.com/magazine/783-infer-once-run-everywhere-zero-token-architecture) - [Building an Agentic Software Factory](https://www.wearedevelopers.com/magazine/796-building-an-agentic-software-factory) - [Do You Trust Your Agents? Five Quick Ways to Contain Them](https://www.wearedevelopers.com/magazine/787-do-you-trust-your-agents-five-quick-ways-to-contain-them) ## Related Jobs - [Staff Software Engineer, Copilot Code Review](https://www.wearedevelopers.com/jobs/ext/4743636-staff-software-engineer-copilot-code-review) at **GitHub** - [Principal Software Engineer, Copilot Code Review](https://www.wearedevelopers.com/jobs/ext/4667602-principal-software-engineer-copilot-code-review) at **GitHub** - [Security Architect](https://www.wearedevelopers.com/jobs/ext/4904894-security-architect) at **PwC** - [Microsoft D365 CRM + Copilot/Ai Functional Lead, Manager](https://www.wearedevelopers.com/jobs/ext/4647023-microsoft-d365-crm-copilot-ai-functional-lead-manager) at **PwC** - [Cyber Defense & Incident Response](https://www.wearedevelopers.com/jobs/ext/4906208-cyber-defense-incident-response) at **Delivery Hero SE** - [Cyber Defense & Incident Response](https://www.wearedevelopers.com/jobs/ext/4888343-cyber-defense-incident-response) at **Delivery Hero SE**