rubber-blueR
VAPI7mo ago
rubber-blue

MCP tools in model.tools still not working as expected.

For reference see:
supportUnable to add MCP to tools config

@Shubham Bajaj Thanks, adding the MCP in the global tools now seems to work.

However

  1. The documentation is still incorrect and not useful at all: https://docs.vapi.ai/tools/mcp
  2. The method shown in the mcp docs, by adding the tool to the
    tools
    object in the
    model
    config does not work.
Just to be clear this example is broken.

{
  "model": {
    "provider": "openai",
    "model": "gpt-4o",
    "messages": [
      {
        "role": "system",
        "content": "... removed for brievety"
      }
    ],
    "tools": [
      {
        "type": "mcp",
        "name": "mcpTools", // this field does not exist in the api, however a name is required
        "server": {
            "url": "https://actions.zapier.com/mcp/actions/"
        }
      }
    ]
  }
}


It will result in this error:

Body: {
  "message": [
    "model.each value in tools.property name should not exist"
  ],
  "error": "Bad Request",
  "statusCode": 400
}


Adding the name in the
function.name
parameter allow us to save the configuration, however then the assistant fails to add and execute the mcp tools, it results in the same issue i described before, where it will literally try to call that function name on the mcp server. So it seems like the MCP tool in the
model.tools
config are interpreted as regular tools, instead of being used to fetch the mcp tools and dynamically add them to the assistants tools.
Connect your assistant to dynamic tools through MCP servers for enhanced capabilities.
Was this page helpful?