v1

latestOpenAPI 3.0.3MIT2026-07-132953108.7 KB
MCP Tools

Execute MCP Tool

Executes an MCP (Model Context Protocol) tool that has been configured in Bifrost. This endpoint is used to execute tool calls returned by AI models during conversations. Requires MCP to be configured in Bifrost.

post/v1/mcp/tool/execute

Request body

idstring

Unique tool call identifier

type'function'

Tool call type

Example request

{
  "id": "tool_123",
  "type": "function",
  "function": {
    "name": "get_weather",
    "arguments": "{\"location\": \"San Francisco, CA\"}"
  }
}

Response

Tool execution successful

role'user' | 'assistant' | 'system' | 'tool' required

Role of the message sender

tool_call_idstring

ID of the tool call (for tool messages)

refusalstring

Refusal message from assistant

thoughtstring

Assistant's internal thought process

Example response

{
  "role": "user",
  "content": "Hello, how are you?",
  "tool_calls": [
    {
      "id": "tool_123",
      "type": "function",
      "function": {
        "name": "get_weather",
        "arguments": "{\"location\": \"San Francisco, CA\"}"
      }
    }
  ]
}