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"}
}
]
}'
from danube import DanubeClient
with DanubeClient(api_key="YOUR_API_KEY") as client:
results = client.tools.batch_execute([
{"tool_id": "tool_weather_001", "parameters": {"city": "San Francisco"}},
{"tool_id": "tool_weather_001", "parameters": {"city": "New York"}},
])
for r in results:
print(f"{r.tool_id}: {'ok' if r.success else r.error}")
import { DanubeClient } from 'danube';
const client = new DanubeClient({ apiKey: 'YOUR_API_KEY' });
const results = await client.tools.batchExecute([
{ toolId: 'tool_weather_001', toolInput: { city: 'San Francisco' } },
{ toolId: 'tool_weather_001', toolInput: { city: 'New York' } },
]);
for (const r of results) {
console.log(`${r.toolId}: ${r.success ? 'ok' : r.error}`);
}
{
"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
}
]
}
Tools
Batch Call Tools
Execute multiple tools in a single request
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"}
}
]
}'
from danube import DanubeClient
with DanubeClient(api_key="YOUR_API_KEY") as client:
results = client.tools.batch_execute([
{"tool_id": "tool_weather_001", "parameters": {"city": "San Francisco"}},
{"tool_id": "tool_weather_001", "parameters": {"city": "New York"}},
])
for r in results:
print(f"{r.tool_id}: {'ok' if r.success else r.error}")
import { DanubeClient } from 'danube';
const client = new DanubeClient({ apiKey: 'YOUR_API_KEY' });
const results = await client.tools.batchExecute([
{ toolId: 'tool_weather_001', toolInput: { city: 'San Francisco' } },
{ toolId: 'tool_weather_001', toolInput: { city: 'New York' } },
]);
for (const r of results) {
console.log(`${r.toolId}: ${r.success ? 'ok' : r.error}`);
}
{
"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
array
required
Array of tool calls (1-10 items)
Show Tool call object
Show Tool call object
string
required
The tool UUID to execute
object
default:{}
Input parameters for the tool
array
Dotted paths to keep in this call’s result, e.g.
["matches[].id", "matches[].email"] — the same projection Call Tool takes. Applied before the per-call size cap, so a verbose endpoint is reduced rather than trimmed. The full result is still stored under the element’s execution_id.integer
default:32000
Per-call cap on this result’s serialized size (max 500000)
string
Completes the consent handshake for this one call on a key that requires confirmation. The batch never fails as a whole: the element comes back with
confirmation_required until it is repeated with the token.Response
array
Array of results in the same order as the input calls
Show Result object
Show Result object
string
The tool that was executed
boolean
Whether the tool executed successfully
any
Tool output (varies by tool)
string
Error message if the call failed
object
Present when this call needs consent: the tool, the exact parameters and the
confirm_token to repeat it withstring
Handle for this element’s stored full result
object
Present when
fields was sent for this call: the paths kept and the paths that matched nothingExample
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"}
}
]
}'
from danube import DanubeClient
with DanubeClient(api_key="YOUR_API_KEY") as client:
results = client.tools.batch_execute([
{"tool_id": "tool_weather_001", "parameters": {"city": "San Francisco"}},
{"tool_id": "tool_weather_001", "parameters": {"city": "New York"}},
])
for r in results:
print(f"{r.tool_id}: {'ok' if r.success else r.error}")
import { DanubeClient } from 'danube';
const client = new DanubeClient({ apiKey: 'YOUR_API_KEY' });
const results = await client.tools.batchExecute([
{ toolId: 'tool_weather_001', toolInput: { city: 'San Francisco' } },
{ toolId: 'tool_weather_001', toolInput: { city: 'New York' } },
]);
for (const r of results) {
console.log(`${r.toolId}: ${r.success ? 'ok' : r.error}`);
}
{
"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 thebatch_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"}}
]
})
| Field | Meaning |
|---|---|
tool_id | The tool that was executed |
success | Whether it executed successfully |
result | The tool’s payload, parsed — the execution envelope is unwrapped |
truncated | Whether the result was trimmed to fit the size cap |
cursor | Upstream pagination cursor, when the payload has one |
error | Error message, or null |
_meta.redaction | Present when credential values in the result were masked: count, fields (path, key, rule), mode |
calls[].max_response_chars (max 500,000) to raise it. Oversized results are
trimmed at JSON element boundaries — whole array entries are dropped from the
tail — so result is always valid JSON, and what was dropped is described in
_meta.truncation_note.
Secrets are redacted
Credential values an upstream hands back (environment variables, API keys, tokens, private keys) are masked as[REDACTED:<FIELD>] before any result
reaches you, on every surface, and the masked form is what Danube stores.
_meta.redaction.count says how many fields were masked and fields says
where. This is Danube policy, not a broken tool: if a later call genuinely
needs such a value, store it as a credential on the service, or reference it
with env:// / vault://, rather than asking a tool to return the raw
secret. Tools whose purpose is to return a newly created credential are
marked as such and report passthrough_reason instead.