GET /agents/runs/{id}, error.type = "AgentLoopUnknownToolAlias"
When this error occurs
The workflow routes every emitted tool call by the shape of its wire name:- Dash-prefixed (
{alias}-{tool}): alias must match anmcp_servers[].aliasfor this run’s effective config. - Dash-free (
{tool}): name must match an entry in caller-declaredtools[].
pending_tool_calls, so the run fails.
Common causes:
- The system prompt or the tool catalog references a tool that wasn’t actually registered for this run (typo in alias / name).
- The model hallucinated a tool name (rare with
tool_choiceset; more common withautoand a loose prompt).
How to fix
- Make sure every tool the system prompt mentions also appears in
mcp_serversortools[]for the run’s effective config. - Tighten the prompt: “Only use the tools listed below; do not invent new ones.”
- Use
tool_choice: {kind: any}to force a real tool, orspecific_tool(with optionalmcp_alias) if you know which one is expected next.

