EveryDocumentation Index
Fetch the complete documentation index at: https://docs.hyperterse.com/llms.txt
Use this file to discover all available pages before exploring further.
tools/call request passes through a deterministic pipeline. The stages are identical for DB-backed and script-backed tools — only the execution step differs. If any stage fails, execution halts immediately and an error response is returned.
Tool resolution
Hyperterse matches the tool name fromtools/call to the tool definition it loaded for that server run.
If no tool matches, a JSON-RPC error is returned with code -32601.
Authentication
If the tool defines anauth block, the configured plugin is invoked with the request context and policy parameters.
- Plugin returns
nil: authentication passes; the request continues. - Plugin returns an error: the request stops; the error goes back to the caller.
- No
authblock: stage is skipped entirely.
Input transform
Ifmappers.input is configured or discovered by convention, the mapper script’s export default function executes in the embedded runtime.
Payload:
Execution
The execution stage branches based on the tool’s configuration. Only one path runs per invocation.Script-backed tools
Whenhandler is configured, the handler script’s export default function executes in the embedded runtime. The return value becomes the execution result.
DB-backed tools
Whenuse and statement are configured, the executor runs six substeps:
- Input validation — validate all declared inputs against type definitions. Missing required inputs and type mismatches produce errors.
- Environment substitution — resolve
{{ env.VAR }}placeholders. Missing variables produce errors. - Input substitution — replace
{{ inputs.field }}placeholders with post-transform values. Substitution is textual. - Cache check — if caching is enabled, compute the cache key from tool name + statement hash. On hit, return cached result and skip connector execution.
- Connector execution — run the statement against the configured connector and return row/object results.
- Cache store — on miss, store the result with the configured TTL.
Output transform
Ifmappers.output is configured or discovered by convention, the mapper script’s export default function executes in the embedded runtime.
Payload:
Response serialization
The final result is JSON-encoded and wrapped in an MCP content block:Error propagation
| Stage | Error condition | JSON-RPC code |
|---|---|---|
| Tool resolution | Tool name not found | -32601 |
| Authentication | Plugin returns error | -32000 |
| Input transform | Script throws | -32000 |
| Input validation | Missing input or type mismatch | -32000 |
| Env substitution | Missing variable | -32000 |
| Connector execution | Query error | -32000 |
| Handler execution | Script throws | -32000 |
| Output transform | Script throws | -32000 |