Skip to main content
POST
/
v1
/
mcp
/
tool
/
execute
curl --request POST \
  --url http://localhost:8080/v1/mcp/tool/execute \
  --header 'Content-Type: application/json' \
  --data '
{
  "id": "call_123",
  "type": "function",
  "function": {
    "name": "get_weather",
    "arguments": "{\"location\": \"San Francisco\"}"
  }
}
'
{
  "name": "get_weather",
  "role": "tool",
  "tool_call_id": "call_123",
  "content": "The weather in San Francisco is 72°F and sunny."
}

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[]