Test Tool
POST /tools/{tool_id}/testInvoke a tool outside a run (annex 09 §8).
Arguments are validated against the tool’s schema; secrets resolve in the caller’s
scope, exactly as they would at run time; the response is redacted and capped at the
tool’s own response_max_chars. Nothing is written: no run, no step, no ledger row —
except for code_exec and web_search, which cost money and are therefore
attributed to the caller.
Rate-limited separately from the general API limit, because this endpoint is the most convenient way in the product to hammer a partner API.
Parameters
Section titled “Parameters”| Name | In | Type | Notes | |
|---|---|---|---|---|
tool_id | path | string (uuid) | required | — |
Request body — ToolTestRequest
Section titled “Request body — ToolTestRequest”| Field | Type | Notes | |
|---|---|---|---|
arguments | object | optional | — |
Responses
Section titled “Responses”| Status | Description | Body |
|---|---|---|
200 | Successful Response | ToolTestResult |
422 | Validation Error | HTTPValidationError |
Example
Section titled “Example”The body shows the fields the schema always carries. Which combination is legal is a service rule the schema cannot express, so read the description above before copying this.
curl -X POST https://your-deployment.example.com/tools/{tool_id}/test \ -H "Authorization: Bearer $COBRE_TOKEN" \ -H "Content-Type: application/json" \ -d '{ "arguments": {} }'Response — ToolTestResult
Section titled “Response — ToolTestResult”| Field | Type | Notes | |
|---|---|---|---|
tool_id | string (uuid) | required | — |
slug | string | required | — |
ok | boolean | required | — |
output | string | required | — |
truncated | boolean | optional | Default false. |
duration_ms | integer | optional | Default 0. |
credentials_used | string[] | optional | — |
error | string | null | optional | — |