By Sagar Shankaran, Founder of CallSphere
Connect tools and MCP servers to Claude Agent Skills: auth, JSON schemas, error handling, and idempotency — and test each path with skill-creator.
Key takeaways
A skill that only writes text is easy. The moment a skill calls a real tool — hits an API, mutates a database, sends a message — the failure surface explodes. Now you have authentication, malformed arguments, partial failures, retries, and the very real possibility of doing the same dangerous thing twice. This is where most Agent Skills quietly break in production, and it's also where the gap between a demo and a dependable system is widest. This post is about wiring tools and MCP servers into skills correctly, and how to test that wiring with skill-creator so the failures show up in evals instead of on call.
The Model Context Protocol is an open standard, introduced in late 2024, that connects Claude to external tools and data through MCP servers; Agent Skills pair with it by teaching Claude when and how to use those tools. Getting that pairing right is four concerns — auth, schemas, error handling, and idempotency — and each one is testable.
The cleanest mental model is a hard boundary. The MCP server owns the connection to the outside world: the credentials, the network calls, the rate limits, the retries against the upstream API. The skill owns the decision — when to call which tool, with what arguments, and what to do with the result. Keeping this boundary sharp means the skill's body never contains an API key, a token, or a raw endpoint, and that is both a security property and a context-hygiene property.
In practice this means the skill body reads like "when the user confirms the booking, call the create_booking tool with the validated payload," and the server is what actually authenticates and posts. If you find yourself writing auth logic into a skill, that logic is in the wrong place.
The JSON schema on a tool is not documentation, it is enforcement. A precise schema — required fields, enums for constrained values, formats for dates and emails, sensible bounds — means many malformed calls are rejected structurally before any side effect occurs. Loose schemas push that validation into prose the model may or may not honor, which is exactly the kind of thing that passes in a demo and fails under variance.
Hear it before you finish reading
Talk to a live CallSphere AI voice agent in your browser — 60 seconds, no signup.
{
"name": "create_booking",
"input_schema": {
"type": "object",
"required": ["service", "start_iso", "customer_email"],
"properties": {
"service": { "type": "string", "enum": ["cleaning", "repair", "inspection"] },
"start_iso": { "type": "string", "format": "date-time" },
"customer_email": { "type": "string", "format": "email" },
"idempotency_key": { "type": "string" }
}
}
}The enum makes an invalid service impossible to submit, and the explicit idempotency_key sets up the safety we'll use below. Notice the schema does work the skill body no longer has to describe in fragile sentences.
The flow that matters is not the happy path — it's what happens when the call fails. A well-wired skill treats every tool result as something to inspect, not assume.
flowchart TD
A["Skill decides to call tool"] --> B["Validate args vs schema"]
B -->|Invalid| C["Fix args, no side effect"]
B -->|Valid| D["MCP server authenticates & calls API"]
D --> E{"Result?"}
E -->|Success| F["Use structured data"]
E -->|Transient error| G["Retry with same idempotency key"]
E -->|Hard error| H["Surface clear message to user"]
G --> DThe retry edge is the subtle one. A transient failure — a timeout, a 503 — should be retried, but only safely. If the first attempt actually succeeded upstream before the connection dropped, a naive retry creates a duplicate booking. That is precisely what the idempotency key prevents, which is why it belongs in the schema from the start.
Authentication should be invisible to the skill. The MCP server holds the OAuth token or API key, refreshes it, and attaches it to outbound requests; the skill simply calls the tool. This keeps credentials out of the model's context window — where they could be echoed into a transcript or a log — and centralizes rotation. When a token expires, you fix it in one place, not in every skill that touches the service.
A practical rule: if a secret value ever appears in SKILL.md or in a tool argument the model fills in, treat it as a bug. The model should pass identifiers and payloads, never credentials.
Mutating tools — anything that creates, charges, or sends — need idempotency, because in an agentic loop a call can be repeated by a retry, a re-plan, or a model that didn't register the first success. The pattern is to attach a stable key derived from the intent (for a booking: customer, service, and slot), so the server can recognize a repeat and return the original result instead of performing the action again. Read-only tools don't need this; every write does.
Still reading? Stop comparing — try CallSphere live.
CallSphere ships complete AI voice agents per industry — 14 tools for healthcare, 10 agents for real estate, 4 specialists for salons. See how it actually handles a call before you book a demo.
Generate the key from the request's semantic content, not a random value, so two attempts at the same action collide and two genuinely different actions don't. This single discipline converts the scariest class of agent bug — silent duplication of real-world effects — into a harmless no-op.
Most skill eval sets only test the happy path, which is exactly why tool-wiring bugs reach production. Your scenarios should deliberately exercise the failure edges: a prompt that would produce an invalid argument (does the schema catch it?), a simulated transient error (does the skill retry safely?), and a repeated request (does idempotency hold?). Because skill-creator runs each scenario multiple times, it's well suited to surfacing the intermittent, retry-related bugs that single runs miss.
| Concern | Where it lives | Eval scenario to add |
|---|---|---|
| Schema validation | Tool definition | Prompt that yields a bad field; expect rejection |
| Auth | MCP server | Confirm no secret appears in transcript |
| Error handling | Skill body | Inject a tool error; expect clear recovery |
| Idempotency | Key + server | Repeat the same action; expect one effect |
The Model Context Protocol is an open standard, introduced in late 2024, that connects Claude to external tools and data through MCP servers. Agent Skills complement it by teaching Claude when and how to use those connected tools.
So credentials never enter the model's context, where they could surface in a transcript or log, and so token rotation happens in one place. The skill passes payloads and identifiers; the server holds the secrets.
Whenever it mutates state — creates, charges, or sends. In an agentic loop a call can be repeated by a retry or re-plan, and a content-derived key lets the server turn a duplicate attempt into a safe no-op.
CallSphere wires these same tool-and-MCP patterns into voice and chat agents that answer every call and message, call real tools mid-conversation — booking, lookups, payments — and run safely 24/7. See it live at callsphere.ai.
Source & attribution: This is an independent, original explainer inspired by Anthropic's coverage on the Claude blog. Claude, Claude Code, Claude Cowork, Claude Opus, and the Model Context Protocol are products and trademarks of Anthropic. CallSphere is not affiliated with or endorsed by Anthropic.

Written by
Sagar Shankaran· Founder, CallSphere
LinkedInSagar Shankaran is the founder of CallSphere, where he builds production AI voice and chat agents deployed across healthcare, hospitality, real estate, and home services. He writes about agentic AI, LLM engineering, and shipping voice agents that handle real calls in production.
See how AI voice agents work for your industry. Live demo available -- no signup required.
One reschedule text hits your scheduler, package balance, tutor shift and invoice. Here is what MCP changed for tutoring and test-prep center owners in 2026.
Anthropic's Claude Fable 5 and Mythos 5 explained: pricing, availability, frontier benchmarks, the dual-model safeguard architecture, and what they mean for AI agents.
Where Claude Code, MCP, and multi-agent systems are taking GTM engineering next, and how to prepare your team now for standing and multi-agent workflows.
Where Claude Cowork and the Claude agent ecosystem are heading next — standing agents, MCP, skills as a moat — and the concrete moves to prepare your team now.
The metrics, leading signals, and anti-metrics that prove Claude Cowork is working — acceptance rate, time-to-outcome, and why usage counts mislead.
Shipping an agentic GTM workflow is easy; proving it works is hard. The metrics, signals, and eval loops that show a Claude Code rebuild is paying off.
© 2026 CallSphere Inc. All rights reserved.
Made within San Francisco
Watch how CallSphere handles real customer calls, schedules appointments, and processes payments — live.
Try Live DemoBook a DemoCalculate Your ROI