Skip to main content
POST
/
v1
/
mcp
/
tool
/
execute
A valid request URL is required to generate request examples
{
  "name": "get_weather",
  "role": "tool",
  "tool_call_id": "call_123",
  "content": "The weather in San Francisco is 72°F and sunny."
}

Authorizations

Authorization
string
header
required

Bearer token authentication. Use your provider API key or Bifrost authentication token. Virtual keys (prefixed with sk-bf-) can also be passed here.

Query Parameters

format
enum<string>
default:chat

Format of the tool execution request/response.

Available options:
chat,
responses

Body

application/json

MCP tool execution request. The schema depends on the format query parameter:

  • format=chat or empty (default): Use ChatAssistantMessageToolCall schema
  • format=responses: Use ResponsesToolMessage schema
function
object
required
index
integer
type
string
id
string

Response

Tool executed successfully

MCP tool execution response.

role
enum<string>
required
Available options:
assistant,
user,
system,
tool,
developer
name
string
content

Message content - can be a string or array of content blocks

tool_call_id
string

For tool messages

refusal
string
audio
object
reasoning
string
reasoning_details
object[]
annotations
object[]
tool_calls
object[]