---
title: "Test tool"
method: POST
path: "/v1/senders/{senderId}/agent/tools/{toolId}/test"
tags: ["Agent Tools"]
---

# Test tool

`POST /v1/senders/{senderId}/agent/tools/{toolId}/test`

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.

## Path parameters

- `senderId` string, required
- `toolId` string, required

## Request body

- ToolTestRequest
  - `testParams` object, required — Parameters to pass to the tool for testing.

## Response `200`

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

- ToolTestResponse
  - `run` AgentToolTestRun, required — 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.
    - `id` string, required
    - `toolId` string, required
    - `params` object — The parameters the tool was called with.
    - `success` boolean, required — 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.
    - `statusCode` integer, nullable — HTTP status the tool's webhook returned. Absent for tools that do not go over HTTP.
    - `response` string, nullable — The tool's response body, truncated.
    - `error` string, nullable — Why the run failed, when it did.
    - `durationMs` integer, required
    - `createdAt` string, date-time, required

## Other responses

- `401` — Unauthorized.
- `404` — Tool not found.

---

[API](https://skmtc.net/zavudev/apis/zavu-unified-messaging-layer-api.md) · [All operations](https://skmtc.net/zavudev/apis/zavu-unified-messaging-layer-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/zavudev/zavu-unified-messaging-layer-api/revisions/07b87b6ae707/schema)
