Tool Shape
The canonical shape isToolDefinition from @cyrnel/sdk:
(serviceId, id)is the composite primary key. Toolidmust be a valid TypeScript identifier.nameis human-friendly;idis what code addresses.summary(optional) is a short plain-text label shown in lists and tool docs;descriptionis the long-form markdown.enabledis per-tool, a service can be enabled with some of its tools disabled.
Endpoints
Filtering /tools
Query parameters (all optional):
serviceId: Restrict to one servicequery: Free-text query. Triggers a hybrid FTS5 + vector similarity search (if vector search is available). It uses Reciprocal Rank Fusion (RRF) to combine results from both sqlite-vec vector search and FTS5 full-text match.enabled:true/falsecursor: Opaque pagination token from the previous page’snextCursorlimit: Positive integer, 1–100 (default 20, clamped above 100)
{ items, nextCursor, hasMore }
(see Pagination for cursor rules and error codes) and
includes a derived effectivelyEnabled flag (tool.enabled && service.enabled) as well as hybrid search relevance metadata if a query was provided.
Search Relevance Metadata
When a searchquery is passed, the response items include the following metadata fields:
score:number(optional): The combined hybrid relevance score calculated via Reciprocal Rank Fusion (RRF). Higher scores mean greater relevance.matchType:"fts" | "vector" | "both"(optional): Indicates which search strategy matched the tool.ftsRank:number(optional): The 1-indexed rank position returned by the FTS5 full-text engine.vectorRank:number(optional): The 1-indexed rank position returned by the vector similarity search.
Tool docs
GET /tools/:serviceId/:toolId/docs returns text/markdown generated by
the active environment module’s generateToolDocs. The bundled
typescript-ivm renders a usage page including:
- the tool summary and description
- a typed parameter list derived from
inputSchema - the return shape derived from
outputSchema - a copy-pasteable
cyrnel.services[...].tools[...].invoke(...)snippet
generateToolDocs should render an example in that runtime.
Invocation From Code
The environment bindings expose tools for direct invocation:EnvironmentBindings.
Invocation Gating
cyrnel.invoke rejects with a structured error when:
These checks happen before the adapter is called, so a disabled tool
cannot incur an outbound request.