Skip to main content

Agent Tools

Agents use two types of tools: API tools (HTTP endpoints) and MCP tools (external MCP servers). All tools are resolved at runtime by the platform's tool resolution engine.

Tool Types​

TypeSchemaDescription
api_configHTTP toolCalls external REST APIs
MCP toolsMCP serverTools from connected MCP servers

Database tools were removed

The tenant database feature — database connections (/api/database-configs, /api/db/*), the db_config schema type and the db_event trigger — was removed on 2026-10-03. The server now rejects db_config schemas. To give an agent access to a database, expose the data through an HTTP API and add it as an api_config tool, or connect an MCP server you control (for PostgreSQL, see the MCP Bridge).


MCP Tools​

MCP (Model Context Protocol) tools connect agents to external business systems like ERPs, CRMs, and proprietary APIs. Each agent can have up to 10 MCP servers configured.

How It Works​

  1. Configure an MCP server for your agent via the REST API or MCP Builder tools
  2. The platform connects to the server, loads available tools, and caches them for 5 minutes
  3. Tools are automatically prefixed with the server name to avoid naming collisions (e.g., erp_listar_pedidos)
  4. Authentication is resolved securely via Vault (Bearer token or API Key)

Supported Transports​

TransportUse Case
httpRecommended. Streamable HTTP with automatic SSE fallback
sseLegacy SSE-only servers
stdioLocal servers via stdin/stdout

Reliability Features​

FeatureDescription
Auto-recoveryServers that go down are automatically retried on the next agent request. If reconnection succeeds, status returns to active
Health checkPeriodic checks every 60s detect degraded servers and update their status
Tool call timeoutEach MCP tool call has a 30-second timeout to prevent indefinite blocking
Connection timeoutInitial connection to an MCP server times out after 10 seconds
Graceful shutdownAll MCP connections are properly closed during server shutdown

MCP Server Status​

StatusBehavior
activeNormal operation — tools are loaded
errorServer had a failure — platform will attempt auto-recovery on next request
inactiveDisabled — tools are not loaded
Auto-Recovery

You don't need to manually restart MCP servers that encounter transient errors. The platform automatically retries connection on the next agent request and restores the server to active status upon success.

MCP Server Endpoints​

Full CRUD for managing MCP servers linked to agents.

EndpointMethodAuthDescription
GET /api/mcp-serversGETJWT / API KeyList MCP servers (optional filters: agent_id, status)
GET /api/mcp-servers/:idGETJWT / API KeyGet MCP server details (includes config)
POST /api/mcp-serversPOSTJWT onlyRegister a new MCP server for an agent
PATCH /api/mcp-servers/:idPATCHJWT onlyUpdate MCP server configuration
DELETE /api/mcp-servers/:idDELETEJWT onlyRemove MCP server (hard delete)
POST /api/mcp-servers/:id/invalidate-cachePOSTJWT onlyInvalidate tool cache for a specific server
POST /api/mcp-servers/invalidate-cachePOSTJWT onlyInvalidate tool cache for ALL servers in the tenant

Create / Update fields:

FieldRequiredTypeDescription
agent_idCreate onlyUUIDAgent to link the server to
nameCreate onlystringServer display name
endpointCreate onlystringServer URL or stdio command
descriptionNostringOptional description
transportNohttp | sse | stdioTransport type (default: http)
auth_methodNonone | bearer | api_key | oauthAuth method (default: none)
configNoobjectAdditional config (vault_secret_id, headers, timeout, defaults_from_context)
statusUpdate onlyactive | inactiveServer status
Cache Invalidation

After updating tools on your external MCP server, call the invalidate-cache endpoint to force the platform to reload the tool list immediately instead of waiting for the 5-minute cache TTL.


api_config Authentication​

API tools support authenticated requests to external APIs. The auth configuration uses prefix as the canonical field:

FieldRequiredDescription
prefixYes*Auth prefix: "Bearer", "Basic", or "" (for API key)
secret_refRecommendedReference to encrypted secret in Vault Secrets
typeDeprecatedLegacy field — use prefix instead. If only type is provided, it is automatically inferred to prefix

Example:

{
"editor_schema": {
"api": {
"base_url": "https://api.example.com",
"auth": {
"prefix": "Bearer",
"secret_ref": "MY_API_TOKEN"
},
"endpoints": [{ "name": "list_items", "method": "GET", "path": "/items" }]
}
}
}
auth.type is Deprecated

The auth.type field is deprecated in a previous release. If provided without prefix, the runtime infers: bearer → Bearer, basic → Basic, api_key → "". A deprecation warning will appear in validation results. Migrate to auth.prefix for clarity.


Authentication Summary​

MCP Servers​

EndpointMethodJWTAPI Key
GET /api/mcp-serversGETYesYes
GET /api/mcp-servers/:idGETYesYes
POST /api/mcp-serversPOSTYesNo
PATCH /api/mcp-servers/:idPATCHYesNo
DELETE /api/mcp-servers/:idDELETEYesNo
POST /api/mcp-servers/:id/invalidate-cachePOSTYesNo
POST /api/mcp-servers/invalidate-cachePOSTYesNo