Skip to content

Test tool

View .md
POST

Run a tool with the parameters you supply and return what it answered.

The call is synchronous: the response carries the tool's status, body, and duration, so a green result is evidence the tool ran rather than evidence it was accepted. Each run is also recorded and readable afterwards via GET /v1/senders/{senderId}/agent/tools/{toolId}/test-runs.

A tool that answers with an error is reported as a run with success: false — the endpoint itself still returns 200. This fires the tool's real webhook, so a test has whatever side effects the tool has.

Authorization

  • Authorizationheaderrequired

    Bearer YOUR_API_KEY. Create a key in the dashboard.

Path parameters

  • senderIdstringrequired
  • toolIdstringrequired

Body

application/json

  • testParamsobjectrequired

    Parameters to pass to the tool for testing.

Responses

200The tool ran. Check `run.success` for what it answered.
  • runobjectrequired

    One run of a tool triggered from the test endpoint. Recorded so a test is verifiable after the fact rather than only visible in the response.

    9 properties
    • idstringrequired
    • toolIdstringrequired
    • paramsobject

      The parameters the tool was called with.

    • successbooleanrequired

      Whether the tool returned without error. A tool that answered with a non-2xx status is a failed run, not an error of this endpoint.

    • statusCodeintegernullable

      HTTP status the tool's webhook returned. Absent for tools that do not go over HTTP.

    • responsestringnullable

      The tool's response body, truncated.

    • errorstringnullable

      Why the run failed, when it did.

    • durationMsintegerrequired
    • createdAtstring<date-time>required
401Unauthorized.
  • codestringrequired
  • messagestringrequired
  • detailsobject
404Tool not found.
  • codestringrequired
  • messagestringrequired
  • detailsobject