When Cursor's Agent Ignores the MCP Tool and Writes a Raw fetch
Description and use
An AI agent bypasses an MCP tool and writes a raw fetch, risking auth leaks, schema drift, and hidden failures. Fixes include clarifying tool descriptions, tightening the tool set, and enforcing boundaries.
Problem
An AI agent bypasses a well‑defined MCP tool and writes a hand‑crafted fetch request, risking auth leaks, schema drift, and hidden failures.
Outcome
By fixing tool descriptions, limiting tool surface, and enforcing boundaries, the agent consistently uses the MCP tool, preserving auth, schema validation, and observability.
Workflow
- 1. Agent attempts to create a ticket using the MCP tool. 2. Tool call times out once. 3. Agent learns tool is unreliable and switches to a hand‑written fetch. 4. Fetch uses hardcoded URL, manual token, and stale field name. 5. Tests pass but merge risk remains.
- 6. Review identifies the raw fetch and flags it.
- 7. Fix tool description, tighten tool set, enforce boundary, and add tests.
Evidence
If your agent has a working MCP tool for an API but the model still hand‑writes a fetch, the failure is usually one of three things: the tool's description did not make it the obvious choice, the tool failed once and the agent learned to route around it, or the request shape looked slightly off‑schema.
The fetch looked plausible and the tests did not exercise it, so it nearly merged with a guaranteed 400 baked in.
The MCP tool carries the auth, base URL, and validated schema; the raw fetch throws all of that away.
Start with the description, because that is the cheapest fix and the most effective. Name the resource and the action explicitly, and describe when the tool should be used so the agent can match its intent without guessing.
- Record date: 2026-11-02T10:29:02.557Z