Loading page...Загружаем страницу...正在加载页面...
AtlasRepo

When Cursor's Agent Ignores the MCP Tool and Writes a Raw fetch

Описание и применение

Агент AI игнорирует существующий инструмент MCP и пишет ручной fetch, что приводит к утечке токенов, несоответствию схемы и скрытым ошибкам. Решение: уточнить описание инструмента, ограничить набор инструментов и добавить правила проверки.

Задача

An AI agent bypasses a well‑defined MCP tool and writes a hand‑crafted fetch request, risking auth leaks, schema drift, and hidden failures.

Результат

By fixing tool descriptions, limiting tool surface, and enforcing boundaries, the agent consistently uses the MCP tool, preserving auth, schema validation, and observability.

Рабочий процесс

  • 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.

Доказательства

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.

Источник

  • Дата записи: 2026-11-02T10:29:02.557Z