> ## Documentation Index
> Fetch the complete documentation index at: https://vetta.sh/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# tools

> The tool catalog and its one run route — client.tools.

Search the catalog, read one tool, run an endpoint, and read past runs. Scopes: `tools:read` to read, `tools:run` to run
(`agents:read` and `sessions:write` are also accepted). Guide: [Tools](https://vetta.sh/docs/developers/tools.md).

## search

```ts theme={"system"}
client.tools.search(query?: { q?: string; category?: string; kind?: "platform" | "naive"; limit?: number; after?: string }): Promise<ToolPage>
```

`GET /v1/tools`. A page of tool summaries plus `facets` (matches per category) and `total`. With `q` and no curated
match, data-index items (`data:<id>`, `social:<id>`) come back too.

## get

```ts theme={"system"}
client.tools.get(slug: string): Promise<ToolDetail>
```

`GET /v1/tools/{slug}`. The tool with its endpoints, input schemas, samples and live prices.

A data-catalog endpoint's input schema is read live from its source: call
`GET /v1/tools/{slug}?endpoint={endpoint slug}` (see [Live input schema](https://vetta.sh/docs/developers/tools.md#live-input-schema)). `get` does not
take an endpoint yet.

## run

```ts theme={"system"}
client.tools.run(tool: string, input?: object, options?: { wait?: boolean; identityId?: string; approvals?: "return" | "throw" | "wait"; timeoutMs?: number }): Promise<ToolRun | Approval>
```

`POST /v1/tools/runs`. Runs one endpoint by slug (`"tiktok.profile"`) and answers a `run` with `output` and
`cost_micro_usd`. `wait: true` polls an async run until it settles (default limit 10 minutes). `identityId` runs on
behalf of an identity so its approval rules apply. A held run returns its `approval` by default; see
[Approvals](https://vetta.sh/docs/developers/approvals.md).

```ts theme={"system"}
const run = await client.tools.run("tiktok.profile", { username: "nasa" });
```

## runs.list

```ts theme={"system"}
client.tools.runs.list(query?: { tool?: string; status?: string; limit?: number; after?: string }): Promise<Page<ToolRun>>
```

`GET /v1/tools/runs`. Past runs, newest first.

## runs.get

```ts theme={"system"}
client.tools.runs.get(id: string): Promise<ToolRun>
```

`GET /v1/tools/runs/{id}`. One run; poll it while `status` is `pending`.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.