API reference · Tools
Create a tool
https://goblins-call-api.onrender.com/v1/toolsGives an agent an HTTP endpoint of yours to call. Switch it on by adding its ID to the agent’s toolIds, or by mentioning it as @name in the instructions.
Needs a workspace API key.
Body
agentIdstringOptionalThe agent the tool is for. It cannot be changed afterwards.
namestringRequired1–128 charsAn identifier the model uses to ask for the tool, such as check_order_status. It is saved in lower case with anything but letters, digits and _ turned into _. Instructions mention it as @check_order_status.
descriptionstringRequiredup to 5,000 charsWhat the tool does and when to use it. The model reads this to decide.
kindenumOptionalduring_call · before_call; default during_callduring_call tools are run by the model in the middle of a conversation. before_call tools run once as the call starts, and their response is added to the agent’s instructions.
methodenumOptionalGET · POST; default GETThe HTTP method of the request to your endpoint.
urlstringRequiredYour endpoint. Must be a public http(s) address; redirects are not followed. May contain {{placeholders}}.
paramsobject[]OptionalThe arguments the model supplies, each { "key": "order_id", "value": "A-1042" }. value is an example shown to the model, and what is sent when the model leaves the argument out. Sent as the query string of a GET, or as the JSON body of a POST that has no body of its own.
headersobject[]OptionalExtra request headers, each { "key", "value" }. Values may contain {{placeholders}}.
bodystringOptionalA body template for a POST, with {{placeholders}}. Sent as JSON unless a Content-Type header says otherwise.
authenumOptionalnone · bearer · api_key · basic; default noneHow the request authenticates to your endpoint.
authTokenstringOptionalThe bearer token, API key or basic-auth password. Stored encrypted.
authKeyHeaderstringOptionaldefault X-API-KeyThe header an api_key credential is sent in.
authUsernamestringOptionalThe username for basic auth.
timeoutMsintegerOptional500–60,000; default 10,000How long to wait for your endpoint. A request is cut off at 30 seconds whatever is set here.
outputsobject[]OptionalThe fields your endpoint answers with, each { "name", "description" }, for your own reference in the studio.
sampleOutputstringOptionalAn example response. The model is shown it so it knows what to expect back.
Errors
400The body failed validation. details lists each field and what is wrong with it.
400URL_NOT_ALLOWEDThe URL is not a public http(s) address.
404No agent in your workspace has that ID.
Every request can also answer 401, 429 and 500: see Errors.
curl -X POST "https://goblins-call-api.onrender.com/v1/tools" \
-H "Authorization: Bearer $CRACKLE_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"agentId": "ua_3f9a1c2b",
"name": "check_order_status",
"description": "Looks up an order by its number, which the caller reads out. Use it when the caller asks where their order is.",
"kind": "during_call",
"method": "GET",
"url": "https://your-app.com/api/orders/{{order_id}}",
"params": [
{
"key": "order_id",
"value": "A-1042"
}
],
"auth": "bearer",
"authToken": "YOUR_ENDPOINT_TOKEN",
"timeoutMs": 5000
}'{
"tool": {
"id": "tool_5d2e8a41c07b",
"userId": "usr_8c1d2e3f4a5b",
"agentId": "ua_3f9a1c2b",
"name": "check_order_status",
"description": "Looks up an order by its number, which the caller reads out. Use it when the caller asks where their order is.",
"kind": "during_call",
"method": "GET",
"url": "https://your-app.com/api/orders/{{order_id}}",
"timeoutMs": 5000,
"params": [{ "key": "order_id", "value": "A-1042" }],
"headers": [],
"auth": "bearer",
"authToken": "…",
"outputs": [{ "name": "status" }, { "name": "eta" }],
"createdAt": "2026-10-11T08:20:03.000Z",
"updatedAt": "2026-10-11T08:20:03.000Z"
}
}