---
url: >-
  https://adk.nht.io/api/@nhtio/adk/batteries/tools/memory/variables/updateMemoryTool.md
description: 'Replace an existing {@link @nhtio/adk!Memory} by `id`.'
---

# Variable: updateMemoryTool

```ts
const updateMemoryTool: Tool<SpooledJsonArtifact<unknown>>;
```

Defined in: [batteries/tools/memory/index.ts:133](https://github.com/NHTIO/ADK/blob/v1.20260605.0/src/batteries/tools/memory/index.ts#L133)

Replace an existing [@nhtio/adk!Memory](../../../../common/classes/Memory.md) by `id`.

## Remarks

The model supplies `id` plus any subset of `content` / `confidence` / `importance`; fields
left undefined retain their prior values. `updatedAt` is always bumped to the current time;
`createdAt` is preserved. Returns an error when no memory with the supplied `id` is found.
