Skip to main content

Memory Rules

MCP tools for the Memory Rules module. See the Memory Rules module docs for permissions and data model.

list-memory-rules​

List memory rules

Arguments​

ArgumentTypeRequiredDescription
memory_store_idstringnoOnly the rules of this memory store
project_idstringnoProject ID (required if not using project key auth)
limitnumbernoResults 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.
offsetnumbernoResults to skip. Negative or not an integer it is 400 VALIDATION_FAILED.

create-memory-rule​

Create a memory rule

Arguments​

ArgumentTypeRequiredDescription
memory_store_idstringyesThe destination store, and the rule's owning scope
onstringyesThe 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_idsarray<string> | nullnoAgents whose turns this rule reads. Omit or send null for every agent in the store's project.
agent_idstring | nullnoHandler agent (mutually exclusive with tool_id)
tool_idstring | nullnoHandler tool (mutually exclusive with agent_id)
actionstring | nullnoOperation id, for a tool handler
preset_parametersobject | nullnoMerged into a tool handler's input before invocation. The turn's own fields are reserved and win.
promptstring | nullnoReplaces the built-in extractor's task instructions. The JSON response contract and the transcript are always appended. Not valid with a handler.
ai_provider_idstring | nullnoProvider override for the built-in extractor's completion. Not valid with a handler.
modelstring | nullnoModel override for the built-in extractor's completion. Not valid with a handler.
enabledbooleannoA disabled rule is kept and never fires

get-memory-rule​

Get a memory rule

Arguments​

ArgumentTypeRequiredDescription
memory_rule_idstringyesMemory rule ID

update-memory-rule​

Update a memory rule

Arguments​

ArgumentTypeRequiredDescription
memory_rule_idstringyesMemory rule ID
onstringnoThe 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_idsarray<string> | nullnoSend null to widen the rule to every agent in the project
agent_idstring | nullno—
tool_idstring | nullno—
actionstring | nullno—
preset_parametersobject | nullno—
promptstring | nullno—
ai_provider_idstring | nullno—
modelstring | nullno—
enabledbooleanno—

delete-memory-rule​

Delete a memory rule

Arguments​

ArgumentTypeRequiredDescription
memory_rule_idstringyesMemory rule ID