A tool is a function the agent calls with validated args. Return one fromDocumentation Index
Fetch the complete documentation index at: https://docs.ixo.world/llms.txt
Use this file to discover all available pages before exploring further.
getTools (boot-time) or getRequestTools (per-request).
Build a PluginTool with the tool() helper
Use the Canonical source: weather-tools.ts.
tool() builder from @ixo/oracle-runtime. The handler gets validated args and a per-request RuntimeContext.Return it from getTools(ctx) for the stable case
Pick See
getTools when the tool list is the same for every user — it only depends on config and identity.getTools in weather.plugin.ts.Return it from getRequestTools(rtCtx) when it varies per request
Use Both hooks merge — their outputs are concatenated on every build. See
getRequestTools when the tool list depends on live state — the user, session, history, or loadedPlugins.getRequestTools in weather.plugin.ts.Override visibility per tool (optional)
A tool inherits its plugin’s See Set visibility for the full recipe.
manifest.visibility by default. Add a visibility field to the PluginTool to override per-tool.What to know before shipping
- Tool
namemust be unique across all loaded plugins. Boot fails on collision. - Throw from the handler for unexpected errors (retry middleware catches them). Return a string for expected misses (“not found”).
- The agent expects a string;
JSON.stringifystructured output to keep the contract clean. ctx.abortSignalpropagates from the inbound request — forward it to everyfetch.- Do not override descriptions of upstream MCP tools — pass them through verbatim and put guidance in the manifest instead.
Where to read next
Add a sub-agent
For multi-step tool sequences with their own prompt.
RuntimeContext reference
Every field a handler can read.