@nhtio/adk/batteries/tools/retrievables
Pre-constructed CRUD tools for model-visible retrievable and RAG-record management.
Remarks
Pre-constructed CRUD tools that expose the ADK's @nhtio/adk!Retrievable surface to the model. Each tool delegates to the corresponding callback on the active @nhtio/adk!DispatchContext (fetchRetrievables, storeRetrievable, mutateRetrievable, deleteRetrievable) — the persistence layer is whatever the consumer wired into the runner.
Retrievables are RAG records and carry an explicit trustTier that drives the LLM battery's rendering envelope. Exposing these CRUD tools to the model is a deliberate deployer decision; the trust tier the model declares when creating or updating a record is honoured verbatim by the persistence layer. The deployer is responsible for choosing whether to register all four tools, only the read-only list_retrievables, or any subset thereof — that registration choice is exactly the trust boundary documented in the Retrievable battery contract.
Output is JSON for every tool so consumers can parse the result without re-tokenising — the artifact constructor is set to @nhtio/adk!SpooledJsonArtifact.
Tools:
- listRetrievablesTool — read-only list of every retrievable currently held by the context.
- storeRetrievableTool — create a new retrievable record (auto-generates
id/createdAt/updatedAtunless explicit values are supplied). - updateRetrievableTool — replace an existing retrievable by
id. BumpsupdatedAt. - deleteRetrievableTool — remove a retrievable by
id.
Variables
| Variable | Description |
|---|---|
| deleteRetrievableTool | Remove an existing @nhtio/adk!Retrievable by id. |
| listRetrievablesTool | List every retrievable record currently held by the active execution context. |
| retrievableTools | Convenience tuple of every retrievable CRUD tool. Spread into a @nhtio/adk!ToolRegistry to register the entire category at once. |
| storeRetrievableTool | Create a new @nhtio/adk!Retrievable record and persist it via the context's storeRetrievable callback. |
| updateRetrievableTool | Replace an existing @nhtio/adk!Retrievable by id. |