Skip to content
Docs

Agents

Tools API and native tools

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. 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. Every native tool can be switched off per workspace, given a monthly budget, and excluded from a key's scope.

ToolService keyOn MCPPriced per
Web SearchSearchweb_search.searchquery
LeanBrowserBrowserREST and WebSocket onlyrequest, active session minute
LeanModel textTextAssistantREST (OpenAI-compatible)1M tokens and audio minute, per tier
LeanModel imageImageAssistantREST (OpenAI-compatible)image, per tier
LeanModel speechSpeechAssistantREST (OpenAI-compatible)1,000 characters, per tier
LeanModel musicMusicAssistantRESTsecond produced, per tier
LeanModel videoVideoAssistantRESTsecond produced, per tier
LeanModel avatarAvatarAssistantREST and WebRTCconnected minute, per tier
LeanModel realtime audioRealtimeAssistantWebSocket (OpenAI Realtime events)1M audio, text and cached tokens, per tier
EmbeddingsEmbeddingsREST (OpenAI-compatible)1M input tokens
EmailEmailemail.sendrecipient
LeanMachineMachineREST onlyactive minute
LeanVision betaTrueSightREST and WebSocket onlystream-hour
LeanMemory: warehouse, vectors, eventsDataWarehouse, VectorStore, EventStoreREST and the columnar data channel (gRPC)GB-month, compute, ingest, egress
LeanMemory storageStorageREST onlyGB-month
LeanDataDatadata.*call, 1,000 rows, subscription month
LeanConnect connectorsConnectorsconnector.*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).

Updated October 14, 2026 · This page as Markdown · All docs as one file