---
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`

## Request

- Base URL: `https://api.zavu.dev`
- URL: `https://api.zavu.dev/v1/senders/{senderId}/agent/tools/{toolId}/test`
- Auth: HTTP bearer

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.

## Changes

> 80 revisions in range; 1 not diffed.

- **2026-08-05** `a08a6318c986`: 1 breaking, 1 info
  - removed the success response with the status `202`
  - added the success response with the status `200`

[Operation history](https://skmtc.dev/zavudev/apis/zavu-unified-messaging-layer-api/changes/v1/senders/:senderId/agent/tools/:toolId/test/post.md)

---

[API](https://skmtc.dev/zavudev/apis/zavu-unified-messaging-layer-api.md) - [All operations](https://skmtc.dev/zavudev/apis/zavu-unified-messaging-layer-api/llms.txt) - [OpenAPI document](https://skmtc.dev/zavudev/apis/zavu-unified-messaging-layer-api/revisions/75bc777b0ffb?raw)
