# Memory Rules MCP Tools

> The MCP tools the SOAT server exposes for the Memory Rules module, with the arguments each tool takes.

# Memory Rules

MCP tools for the Memory Rules module. See the [Memory Rules module docs](/docs/modules/memories) for permissions and data model.

### `list-memory-rules`

List memory rules

#### Arguments

| Argument | Type | Required | Description |
| -------- | ---- | -------- | ----------- |
| `memory_store_id` | `string` | no | Only the rules of this memory store |
| `project_id` | `string` | no | Project ID (required if not using project key auth) |
| `limit` | `number` | no | Results per page. Above the maximum it is clamped, and `limit` in the response reports the page served; below 1 or not an integer it is `400 VALIDATION_FAILED`. |
| `offset` | `number` | no | Results to skip. Negative or not an integer it is `400 VALIDATION_FAILED`. |

### `create-memory-rule`

Create a memory rule

#### Arguments

| Argument | Type | Required | Description |
| -------- | ---- | -------- | ----------- |
| `memory_store_id` | `string` | yes | The destination store, and the rule's owning scope |
| `on` | `string` | yes | The event a firing reads. `generations.completed` fires once per completed turn whatever the transport, and is the only event the built-in extractor may bind to. `conversation_messages.generated` fires per persisted assistant reply and is conversation-backed, so it is for custom handlers. |
| `source_agent_ids` | `array<string> \| null` | no | Agents whose turns this rule reads. Omit or send `null` for every agent in the store's project. |
| `agent_id` | `string \| null` | no | Handler agent (mutually exclusive with tool_id) |
| `tool_id` | `string \| null` | no | Handler tool (mutually exclusive with agent_id) |
| `action` | `string \| null` | no | Operation id, for a tool handler |
| `preset_parameters` | `object \| null` | no | Merged into a tool handler's input before invocation. The turn's own fields are reserved and win. |
| `prompt` | `string \| null` | no | Replaces the built-in extractor's task instructions. The JSON response contract and the transcript are always appended. Not valid with a handler. |
| `ai_provider_id` | `string \| null` | no | Provider override for the built-in extractor's completion. Not valid with a handler. |
| `model` | `string \| null` | no | Model override for the built-in extractor's completion. Not valid with a handler. |
| `enabled` | `boolean` | no | A disabled rule is kept and never fires |

### `get-memory-rule`

Get a memory rule

#### Arguments

| Argument | Type | Required | Description |
| -------- | ---- | -------- | ----------- |
| `memory_rule_id` | `string` | yes | Memory rule ID |

### `update-memory-rule`

Update a memory rule

#### Arguments

| Argument | Type | Required | Description |
| -------- | ---- | -------- | ----------- |
| `memory_rule_id` | `string` | yes | Memory rule ID |
| `on` | `string` | no | The event a firing reads. `generations.completed` fires once per completed turn whatever the transport, and is the only event the built-in extractor may bind to. `conversation_messages.generated` fires per persisted assistant reply and is conversation-backed, so it is for custom handlers. |
| `source_agent_ids` | `array<string> \| null` | no | Send `null` to widen the rule to every agent in the project |
| `agent_id` | `string \| null` | no | — |
| `tool_id` | `string \| null` | no | — |
| `action` | `string \| null` | no | — |
| `preset_parameters` | `object \| null` | no | — |
| `prompt` | `string \| null` | no | — |
| `ai_provider_id` | `string \| null` | no | — |
| `model` | `string \| null` | no | — |
| `enabled` | `boolean` | no | — |

### `delete-memory-rule`

Delete a memory rule

#### Arguments

| Argument | Type | Required | Description |
| -------- | ---- | -------- | ----------- |
| `memory_rule_id` | `string` | yes | Memory rule ID |
