# List tool test runs

> Recent runs of this tool triggered from the test endpoint, newest first. Covers manual tests only: a tool called by an agent during a real conversation is not recorded here.

`GET https://api.zavu.dev/v1/senders/{senderId}/agent/tools/{toolId}/test-runs`

Recent runs of this tool triggered from the test endpoint, newest first. Covers manual tests only: a tool called by an agent during a real conversation is not recorded here.

## Parameters

- `senderId` (path, string, required)
- `toolId` (path, string, required)
- `limit` (query, integer)

## Responses

### 200

Recent test runs.

- `items` (object[], required)
  - `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)

### 401

Unauthorized.

- `code` (string, required)
- `message` (string, required)
- `details` (object)

### 404

Tool not found.

- `code` (string, required)
- `message` (string, required)
- `details` (object)

## Example

```bash
curl -X GET "https://api.zavu.dev/v1/senders/sender_abc123/agent/tools/tool_abc123/test-runs" \
  -H "Authorization: Bearer $ZAVUDEV_API_KEY"
```

```typescript
import Zavudev from "@zavudev/sdk";

const zavu = new Zavudev({ apiKey: process.env.ZAVUDEV_API_KEY });

const result = await zavu.senders.agent.tools.listTestRuns("tool_abc123", {
  senderId: "sender_abc123",
});

console.log(result);
```
