Problems with inbound call MCP tools.
# support
u
We're having problems with an inbound call to an assistant with MCP tools attached. From what we were able to gather the MCP tool is treated as function. Tool discovery is not being used. What we can see in the logs is that a call was made to the endpoint with the tool name corresponding to the MCP tool name that leads to MCP error -32602.
here is the log from the function call
Copy code
{
  "id": "log-45",
  "level": 30,
  "time": 1759919977823,
  "timestamp": 1759919977823000000,
  "severityText": "INFO",
  "severityNumber": 9,
  "body": "Model called tool",
  "attributes": {
    "category": "tool",
    "callId": "0199c367-9e37-7553-9d46-0f5edc24b127",
    "orgId": "f81398d8-0d4a-4ab9-b437-cbb78698b92c",
    "type": "function",
    "id": "toolu_01UCfih34LBxv74RgenF6XUj",
    "function": {
      "name": "our_mcp",
      "arguments": "{\"action\": \"initialize_conversation_context\"}"
    }
  }
}
here is the log from the web call
Copy code
{
  "id": "log-27",
  "level": 30,
  "time": 1759854997984,
  "timestamp": 1759854997984000000,
  "severityText": "INFO",
  "severityNumber": 9,
  "body": "Model called tool",
  "attributes": {
    "category": "tool",
    "callId": "0199bf87-f581-700b-ba46-5dfe78f49a99",
    "orgId": "f81398d8-0d4a-4ab9-b437-cbb78698b92c",
    "type": "function",
    "id": "toolu_01TqVwX8ssxiFHeXiFutaY57",
    "function": {
      "name": "ngrokfree-our-initialize-conversation-context",
      "arguments": "{\"params\": {}}"
    }
  }
}
t
we've been having similar issues. help?
v
Hi, I can help troubleshoot this. The logs show the MCP tool is being called as a function instead of via tool discovery, causing the -32602 error. This can happen if the tool isn’t properly registered or the arguments don’t match the expected schema. I can assist in reviewing the tool registration, argument formatting, and assistant setup to fix this. Can you confirm if tool discovery is enabled and the latest MCP integration is being used? @utvara
@to
u
@Vercel the example logs I've sent are using the same configuration but first one is via the inbound phone call and second one via the web call.
v
It looks like the MCP tool is being invoked as a function rather than via tool discovery, causing the -32602 error. This often happens if the tool isn’t properly registered or the arguments don’t match the expected schema. I can help review your tool registration, argument structure, and assistant configuration to ensure proper discovery and execution. Can you confirm if tool discovery is enabled and the latest MCP integration is in use? @utvara
c
Hi utvara, If you're facing issues with call forwarding drops, here are some steps and solutions to help you troubleshoot: 1. **Identify the Problem**: First, verify if Vapi successfully initiated the call forwarding. Check the API response for the
endedReason
. If it shows
"assistant-forwarded-call"
, Vapi forwarded the call, and you should proceed to check the telephony provider. 2. **Configuration Check**: Ensure your assistant's configuration doesn’t include
"phone-call-control"
in the
serverMessages
if you want Vapi to manage transfers. Set
phoneCallProviderBypassEnabled
to
false
. 3. **Provider Logs**: Use the
phoneCallProviderId
from the API response to check your telephony provider’s logs for transfer errors. 4. SIP Analysis (if applicable): Download the packet capture (
pcapUrl
) and use Wireshark to check for SIP
REFER
packets. This can help identify if the transfer request was sent. 5. **Common Fixes**: - Ensure the destination number format includes the country code. - Verify the destination is not blocking calls. - Confirm your SIP setup is correct if applicable. For more detailed guidance, refer to our [troubleshooting guide](https://docs.vapi.ai/phone-calling/transfer-calls/debug-forwarding-drops).
r
@utvara did you ever figure this out? I'm facing the same issue.
c
Hi, could you please provide a call id where you experienced this issue? We would like to review the logs to identify the cause.
3 Views