Tool not found despite function.name present
# support
c
Hi there, I'm sending the following to create an MCP tool in the API Assistant Create endpoint.
Copy code
{
      name: `c-${body.callId}`,
      description: 'snipped'
      model: {
        ...model,
        tools: [
          {
            type: 'mcp',
            server: {
              url: mcpUrl,
            },
            function: {
              name: 'mcp',
            },
          },
        ],
        toolIds: [],
      },
    }
When I send this, the assistant gets created, but in my call - from just now, 9/11/2025 9:58PM CDT, call ID
f63420b7-fd78-4cf1-9e90-1decfd5da0ff
, I get
MCP error -32602: MCP error -32602: Tool mcp not found
This only happens in the actual calling of the mcp tool, so my voice assistant continues to work but fails when calling tools. I need to create assistants/tools dynamically like this in order to establish authenticated contexts for each user call to my mcp, but I'd prefer a better way, if anyone knows.
v
It looks like the issue is caused by including a
function
property in your MCP tool definition. Instead, define your MCP tool like this:
Copy code
json
{
  "type": "mcp",
  "name": "mcpTools",
  "server": {
    "url": "https://your-mcp-server-url"
  }
}
Remove the
function
field—Vapi will fetch available tools from your MCP server and inject them dynamically. This should resolve the "Tool mcp not found" error. [See MCP Tool docs for reference.](https://docs.vapi.ai/tools/mcp) Source: - [MCP Tool documentation](https://docs.vapi.ai/tools/mcp)
c
Incorrect. I get an error when sending that.
l
Hey, I’ve dealt with that same MCP error before. It usually comes from how the tool function is set up and registered. There’s a better way to handle dynamic tool creation so the context stays authenticated and the calls don’t break. Would you be open to connecting privately so I can dig into your setup and get it fixed ?
c
For sure. Could it be on Monday?
I would really appreciate that!
l
Monday works perfectly. I can help you resolve this directly and more efficiently if we discuss the details privately. What time on Monday would work best for you? @colin
c
@Vapi I've noticed a problem here where if I create transient tools with no function name as recommended above, the chat test functionality never returns a response
@Sahil Can you help here?
c
Make sure the
messages
array is empty. Could you also provide a call id so we can review the logs?
v
Hello Colin How are you doing Have you been able to resolve this issue or do you need any assistance ? @colin
r
@colin did you resolve this issue? I'm having the same problem
v
Hey, I’ve handled similar MCP setup issues before — that error usually means the tool isn’t properly registered when the call starts. I can help you trace where it’s failing and suggest a cleaner way to attach authenticated MCP tools per user dynamically. Quick check — are you creating the assistant before the MCP registration completes? That timing often causes the “tool not found” issue. I can walk you through a more stable flow to handle per-call tool contexts. @RyGuy @colin
2 Views