Troubleshoot MCP tools
Fix common MCP tool problems and follow best practices for reliable tool calls
This page lists best practices and common problems with MCP tools. For how MCP tools work, see MCP tools.
Best practices
- Expose only the tools the voice agent needs. Fewer tools means less context and fewer wrong tool choices.
- Keep results small and focused. Return only the data the model needs to answer the caller.
- Write errors in plain language in
content. The model reads the text, notisError. - Use fixed values or a credential for anything needed to list tools. Variables aren’t filled in for the tool list request.
- Give tools clear descriptions on the server. Callers rarely say a tool’s name, and speech-to-text can mishear it, so the model picks tools by their descriptions.
- Tell the voice agent what to do if a tool isn’t available. For example, offer to transfer the call or take a message.
- Treat server URLs and tokens as secrets. Some providers put a token in the server URL.
Find what went wrong
Start with the call or chat in the Dashboard, then check your MCP server’s logs:
- Logs tab: Open the call from Call logs, or the chat from Chat logs. The call’s Logs tab shows each MCP tool call and any errors when the assistant’s Logging setting is enabled.
- Messages tab: On the call’s page, Messages shows each tool call as a
tool_callsmessage with the name the model used, such asexample-lookup_order. The result follows as atool_call_resultmessage with your server’scontentinresult. - Your MCP server’s logs: If the voice agent had no tools, the tool list request failed when the call started. Vapi’s logs don’t show this failure, so check your server’s logs for the tool list request and any auth errors. Each request includes the
X-Call-Idheader, which you can match to the call. See Headers Vapi sends.
Test a tool in the Dashboard
The Dashboard’s Test panel lets you list a server’s tools and call one with exact arguments, without starting a call.
- Open the MCP tool and click Test (the play icon) at the top of the page.
- Click List MCP Tools to get the server’s tool list.
- Select a tool, enter its arguments as JSON, and click Execute to see the server’s response.
The Test panel has these limits:
- SSE only. The Test panel supports MCP servers that use SSE. For a Streamable HTTP server, save the tool, check Available Tools, and place a test call.
- Headers only. The Test panel sends the headers set on the tool. It doesn’t use a saved credential, and it doesn’t fill in variables.
- Short timeout. Each test request waits up to 5 seconds.
Common problems
Next steps
- Configure MCP tools: review authentication, headers, and transport.
- MCP tool messages and results: review messages and result handling.