# functioncalls (adapter system)

Function-call toolbank: a registry of small, named, executable tools (webSearch, sendApiRequest, runShellCommand, generateHelloWorld, ...) each with an execute(options, api) contract, grouped into...


Function-call **toolbank**. Ported from `leumas-middleware/lib/a.functioncalls` — the portable core:
a registry of small named tools plus the toolbank (named allow-list) grouping contract. Stripped: the
`ollama`/`openai`/`gemini`/`dalle`/`sora` LLM client helpers (they belong to the LLM engine) and the
desktop-only tools that need native binaries (`screenCapture`, `inputEmulator`, `serialPortControl`,
`readClipboard`, ws/serial control).

Feeds chatbot toolbanks alongside [`chatbots`](../chatbots).

## Each function call

`{ name, description, execute(options, api) -> { success, data | error } }`

Bundled: `generateHelloWorld`, `webSearch` (needs `api.google_web_search`), `sendApiRequest`,
`runShellCommand` (whitelisted read-only commands only).

## Tools (`adapters`)

| tool | args | result |
|------|------|--------|
| `list` | — | `{ functionCalls, toolbanks }` |
| `run` | `{ name, options, api }` | the call's `{ success, ... }` |
| `getToolbank` | `{ name }` | `{ name, function_calls }` |
| `registerToolbank` | `{ name, function_calls }` | `{ ok, toolbank }` |
| `runToolbank` | `{ toolbank, name, options, api }` | dispatches only if `name` is in the toolbank |


---
Source: shared/engines/adapters/domain/functioncalls/README.md
Canonical: https://docs.leumas.tech/p/adapters/domain/functioncalls
