Skip to main content
POST
/
v1
/
tools
/
call
/
batch
curl -X POST "https://api.danubeai.com/v1/tools/call/batch" \
  -H "danube-api-key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "calls": [
      {
        "tool_id": "tool_weather_001",
        "tool_input": {"city": "San Francisco"}
      },
      {
        "tool_id": "tool_weather_001",
        "tool_input": {"city": "New York"}
      }
    ]
  }'
{
  "results": [
    {
      "tool_id": "tool_weather_001",
      "success": true,
      "result": {
        "temperature": "18C",
        "condition": "Partly cloudy"
      },
      "error": null
    },
    {
      "tool_id": "tool_weather_001",
      "success": true,
      "result": {
        "temperature": "5C",
        "condition": "Clear"
      },
      "error": null
    }
  ]
}

Overview

Execute up to 10 tool calls in a single request. Each call is executed independently — a failure in one does not affect others. Results are returned in the same order as the input calls. Auth: Requires API key (danube-api-key header). API key permissions are checked per tool.

Body Parameters

calls
array
required
Array of tool calls (1-10 items)

Response

results
array
Array of results in the same order as the input calls

Example

curl -X POST "https://api.danubeai.com/v1/tools/call/batch" \
  -H "danube-api-key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "calls": [
      {
        "tool_id": "tool_weather_001",
        "tool_input": {"city": "San Francisco"}
      },
      {
        "tool_id": "tool_weather_001",
        "tool_input": {"city": "New York"}
      }
    ]
  }'
{
  "results": [
    {
      "tool_id": "tool_weather_001",
      "success": true,
      "result": {
        "temperature": "18C",
        "condition": "Partly cloudy"
      },
      "error": null
    },
    {
      "tool_id": "tool_weather_001",
      "success": true,
      "result": {
        "temperature": "5C",
        "condition": "Clear"
      },
      "error": null
    }
  ]
}

MCP Tool

This endpoint is also available as the batch_execute_tools MCP tool:
result = await mcp.call_tool("batch_execute_tools", {
    "calls": [
        {"tool_id": "tool_weather_001", "tool_input": {"city": "San Francisco"}},
        {"tool_id": "tool_weather_001", "tool_input": {"city": "New York"}}
    ]
})