Tools¶
Tools let the assistant act in your product as the user who asked: look things up, create or change records, open screens. It finds the right tool by meaning, asks the user to confirm anything that changes data, and tells them what happened.
| Skill manifest | MCP server | Host function | |
|---|---|---|---|
| What | A JSON file naming your HTTP API's endpoints | A remote MCP server | A function your app runs itself, such as switching a view |
| Use when | You have a REST API and want no extra server | You have or want an MCP server | No API is involved |
| Defined | In the deployment's tools file | In the deployment's tools file | By your app, with each message |
Every tool has a JSON Schema for its arguments and a mode: read, or write (the default). A write asks the user to confirm before it runs.
Skill manifests and MCP servers¶
One JSON file for the deployment lists the sources, who may use each (roles; empty means everyone) and per-tool settings:
{"sources": [
{"name": "crm", "kind": "http", "file": "crm-skill.json", "roles": ["support"],
"tools": {"create_note": {"confirm": false}}},
{"name": "docs", "kind": "mcp",
"config": {"url": "https://docs.example.com/mcp",
"auth": {"mode": "bearer", "secret_ref": "docs-key"}},
"tools": {"search": {"mode": "read"}}}
]}
- A skill tool names a method and a path (
/tasks/{task_id}/close;{task_id}is filled from the argument of that name). GET and DELETE send other arguments as the query string, other methods as JSON. - MCP tool names get the source name as a prefix (
docs__search). Every MCP tool counts as a write until you set"mode": "read". - Secrets are named, never written in the file:
"secret_ref": "docs-key"reads the environment variableAIA_SECRET_DOCS_KEY(on AWS, filled from Secrets Manager). Or useuser_tokenon a skill API to forward the user's own token, so your API sees the user, not a service account. - A bearer or header secret is one credential for all your tenants. Calls carry the verified ids in
X-Assistant-TenantandX-Assistant-User; scope your data by them, not by the call's arguments. - Public https hosts work as they are. A private network host is refused unless the operator lists that network. Outside local development URLs must be https.
- The file is read at start. A mistake stops the service from starting and says what is wrong. MCP servers are asked what they offer again every five minutes, without a restart.
Host functions¶
Declare them with each message, so every product (and every version of it) brings its own:
{"message": "Show task T-1",
"client_tools": [{"name": "show_task", "description": "Show a task on screen", "mode": "read",
"input_schema": {"type": "object", "properties": {"task_id": {"type": "string"}}, "required": ["task_id"]}}]}
Poll the run. At status: requires_action, read required_action (id, kind, tool, arguments):
confirm: show the user what will happen. AnswerPOST /api/v1/runs/{id}/resumewith{"action_id": "...", "approve": true}(orfalse).client_tool: run it and answer with{"action_id": "...", "result": ...}or{"action_id": "...", "error": "..."}.
The first answer counts; a second gets 409. An action nobody answers within an hour expires with the run. Send the list with every message: a message that lists none has none. At most 20 tools, and all definitions together at most 100,000 characters (large schemas reach this first); names must not clash with the deployment's tools, search_tools or search_knowledge. A result over 64 KB is refused with 422: send a summary. The bundled components do all of this for you.
Limits to know¶
- The model reads tool results as data. Do not return secrets or other users' data, and keep your API's own authorization: the assistant has only the user's access.
- A response over 1 MB is cut and a call takes at most 20 seconds.