Tools
Let an agent perform tasks during a conversation: look up an order, book an appointment or read a database. Find a tool in the catalog or create one using the options below, then connect it to the agent. Connecting or pausing it applies immediately, without publishing.
Four ways to create tools
| Type | When to use it | Section |
|---|---|---|
| Custom API | You have your own HTTP endpoint and want the agent to call it | Custom APIs |
| MCP server | The service already exposes tools over MCP and you choose which to install | MCP servers |
| Database | You want the agent to run read-only queries on PostgreSQL or MySQL | Databases |
| Custom function | You want to run TypeScript logic: transform data, apply business rules or call services | Custom functions |
The workspace catalog also includes tools from apps installed from Platica and older HTTP tools.
Quick example
# 1. Store the credential as a secret (it never goes in the tool definition)
curl -X POST https://api.platic.ai/v1/secrets \
-H "Authorization: Bearer $PLATIC_API_KEY" \
-H "Content-Type: application/json" \
-d '{ "name": "Orders API", "kind": "bearer", "value": "'"$ORDERS_API_TOKEN"'" }'
# 2. Create the API
curl -X POST https://api.platic.ai/v1/tools/apis \
-H "Authorization: Bearer $PLATIC_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"name": "order_status",
"description": "Looks up an order status by its number.",
"request": { "method": "GET", "url": "https://api.example-store.com/orders/{{order}}", "auth": { "type": "bearer" } },
"variables": [{ "name": "order", "type": "string", "description": "Order number", "required": true, "mode": "ai" }],
"secrets": { "auth.token": "'"$SECRET_ID"'" }
}'
# 3. Test it, publish it to the catalog and connect it to the agent
curl -X POST https://api.platic.ai/v1/tools/apis/$INTEGRATION_ID/test \
-H "Authorization: Bearer $PLATIC_API_KEY" \
-H "Content-Type: application/json" \
-d '{ "input": { "order": "1001" } }'
curl -X POST https://api.platic.ai/v1/tools/apis/$INTEGRATION_ID/enable \
-H "Authorization: Bearer $PLATIC_API_KEY"
curl -X PUT https://api.platic.ai/v1/agents/$AGENT_ID/tools/$TOOL_ID \
-H "Authorization: Bearer $PLATIC_API_KEY" // 1. Store the credential as a secret (it never goes in the tool definition)
const secret = await platic.secrets.create({
name: "Orders API",
kind: "bearer",
value: process.env.ORDERS_API_TOKEN!,
});
// 2. Create the API, test it, publish it to the catalog and connect it to the agent
const api = await platic.tools.apis.create({
name: "order_status",
description: "Looks up an order status by its number.",
request: { method: "GET", url: "https://api.example-store.com/orders/{{order}}", auth: { type: "bearer" } },
variables: [{ name: "order", type: "string", description: "Order number", required: true, mode: "ai" }],
secrets: { "auth.token": secret.id },
});
const test = await platic.tools.apis.test(api.id, { input: { order: "1001" } });
if (test.success) {
const { toolId } = await platic.tools.apis.enable(api.id);
await platic.agents.tools.connect(agentId, toolId);
} What you need to know
- Credentials go in secrets: no API or MCP server stores tokens in its definition; if you send a credential directly it answers
400 SECRET_REFERENCE_REQUIREDwith the slot where to bind the secret. - Being in the catalog does not connect it to the agent: publishing an API, syncing tools from an MCP server or connecting a database only adds them to the catalog. Then give them to each agent with Connect a tool.
- Three different states: the source's (
draft/enabled/pausedorconnected), each secret slot's (authorized/needs_authorization/missing) and the connection on the agent's (active/paused). - Permissions: requires Integrations (and secret permissions when managing credentials).
Where to go next
- Workspace catalog and agent tools.
- Secrets, Custom APIs, MCP servers, Databases and Custom functions.
- Errors in Errors and AI tools in the Tools MCP tools.