<!-- https://leantools.ai/doc/tools · HTML twin of this page; the whole documentation: https://leantools.ai/llms-full.txt -->
# Tools API and native tools

Agents

Agents and scripts that do not speak MCP get the identical catalogue over plain HTTP, with real status codes. The list, the input schemas and the billing are the same as on the MCP server.

## Endpoints

 (GET)/api/v1/toolsthe catalogue for this key: the same objects as MCP `tools/list`

 (POST)/api/v1/tools/{name}call a tool; the body is the tool's `arguments` object

curl

```
curl -s https://YOUR-HOST/api/v1/tools/web_search.search \
  -H "Authorization: Bearer lt-..." -H "Content-Type: application/json" \
  -d '{ "query": "LeanTools MCP", "resultCount": 5 }'
```

200

```
{ "query": "LeanTools MCP", "totalResultCount": 5, "items": [ { "position": "1", "title": "…", "url": "https://…", "description": "…" } ],
  "usage": { "credits": 0.005, "balance": 9.995 } }
```

A refusal answers the standard envelope with the HTTP status of the reason (`402 insufficient_credits`, `403 tool_disabled`, `202 approval_pending`, …); see [Errors](https://leantools.ai/doc/errors). Tool names accept the underscore form (`web_search_search`) as on MCP.

## Native tools

Native tools are services LeanTools runs itself. Two of them, web search and email (both part of LeanConnect), are exposed as MCP functions; the others (LeanBrowser, the seven LeanModel catalogues, LeanMachine, LeanVision, LeanMemory) have richer REST, WebRTC and WebSocket surfaces described in the [reference](https://leantools.ai/doc/api). Every native tool can be switched off per workspace, given a monthly budget, and excluded from a key's scope.

| Tool | Service key | On MCP | Priced per |
| --- | --- | --- | --- |
| Web Search | `Search` | `web_search.search` | query |
| LeanBrowser | `Browser` | REST and WebSocket only | request, active session minute |
| LeanModel text | `TextAssistant` | REST (OpenAI-compatible) | 1M tokens and audio minute, per tier |
| LeanModel image | `ImageAssistant` | REST (OpenAI-compatible) | image, per tier |
| LeanModel speech | `SpeechAssistant` | REST (OpenAI-compatible) | 1,000 characters, per tier |
| LeanModel music | `MusicAssistant` | REST | second produced, per tier |
| LeanModel video | `VideoAssistant` | REST | second produced, per tier |
| LeanModel avatar | `AvatarAssistant` | REST and WebRTC | connected minute, per tier |
| LeanModel realtime audio | `RealtimeAssistant` | WebSocket (OpenAI Realtime events) | 1M audio, text and cached tokens, per tier |
| Embeddings | `Embeddings` | REST (OpenAI-compatible) | 1M input tokens |
| Email | `Email` | `email.send` | recipient |
| LeanMachine | `Machine` | REST only | active minute |
| LeanVision  (beta) | `TrueSight` | REST and WebSocket only | stream-hour |
| LeanMemory: warehouse, vectors, events | `DataWarehouse`, `VectorStore`, `EventStore` | REST and the columnar data channel (gRPC) | GB-month, compute, ingest, egress |
| LeanMemory storage | `Storage` | REST only | GB-month |
| LeanData | `Data` | `data.*` | call, 1,000 rows, subscription month |
| LeanConnect connectors | `Connectors` | `connector.*` | completed call, per connector |

## Tool settings in the console

Under Tools & Connectors, each native tool has a configure drawer:

- **Enabled.** Off means `403 tool_disabled` for every key, and the tool disappears from `tools/list`.
- **Monthly budget.** Credits (shown in dollars) the workspace intends to spend on the tool per month. With *pause at budget* on, calls beyond it are refused with `402 tool_budget_reached`; off, the budget only drives the dashboard warning.
- **Settings.** Tool-specific defaults (for example the default result count of web search), stored as JSON and applied server-side.

Changes apply within the credential cache window (60 seconds at most; immediately for the workspace that made the change).
