# Tools

Saved scripts with their inputs and checks: list, read, save, run and verify them.

Web version: https://www.svanja.com/docs/api/tools/

A tool is a saved script that the assistant uses to repeat a job the same way each time, such as a monthly export. You can find your tools under [Skills, Tools](https://app.svanja.com/skills?tab=tools). Use these endpoints to run a tool with new inputs from your own code, or to check that it still works. Reading tools requires the Tools area, which is included in Full access and Read-only. Saving or running a tool requires Full access or Tools set to **Read and write**. Each run uses the cloud computer or a paired machine, so it counts toward your computer time like any other task. For more background, see [Skills, tools and templates](https://www.svanja.com/docs/skills/).

`GET /tools` lists your tools along with their IDs, formatted as `SPACE_ID:path`. `GET /tools/{id}` returns a single tool, including the inputs it expects and what it produces. Use `POST /tools` and `PATCH /tools/{id}` to save a tool.

`POST /tools/{id}/actions` runs a tool when you pass `action` set to `run` along with its `inputs`, or runs its check when you pass `action` set to `verify`:

```json
{ "action": "run", "inputs": { "month": "2026-11" } }
```

Both actions start a task and return it in the response. You can follow the task on [Tasks](https://www.svanja.com/docs/api/tasks/) to get the result. If you prefer working from a terminal, see [svanja tool](https://www.svanja.com/docs/cli/tools-and-templates/).

## Operations

| Operation | What it does | Effect | Endpoints |
| --- | --- | --- | --- |
| `tool.read` | Read tool packages. | Reads only | `GET /tools`<br>`GET /tools/{id}` |
| `tool.run` | Run a tool package. | Changes data in Svanja | `POST /tools/{id}/actions` |
| `tool.save` | Save a tool package. | Changes data in Svanja | `POST /tools`<br>`PATCH /tools/{id}` |

## Endpoints

### GET /api/v1/tools

List tool packages

### POST /api/v1/tools

Save a tool package

### GET /api/v1/tools/{id}

Read a tool package

| Parameter | In | Type | Required | Notes |
| --- | --- | --- | --- | --- |
| `id` | path | string | yes |  |

### PATCH /api/v1/tools/{id}

Update a tool package

| Parameter | In | Type | Required | Notes |
| --- | --- | --- | --- | --- |
| `id` | path | string | yes |  |

### POST /api/v1/tools/{id}/actions

Run or verify a tool package

| Parameter | In | Type | Required | Notes |
| --- | --- | --- | --- | --- |
| `id` | path | string | yes |  |
