Wait for Memory Change
montycat_await_memory_changeWait for memory changes and get notified the moment another agent writes, updates, or deletes data in a shared memory scope. Use it to coordinate agents or confirm writes without polling.
Instructions
Wait until memory CHANGES — returns the moment another agent or session writes, updates, or deletes something in this memory.
This is a live subscription to the database, not a poll: it sleeps until a change actually happens and then returns immediately. Use it to coordinate with other agents sharing a scope ("tell me when someone adds to our shared memory"), or to confirm a write from another session landed. Do NOT call it in a tight loop as a substitute for searching — to find things, use montycat_semantic_search.
Returns {changes: [...], next_seq, oldest_seq, cursor_expired, timed_out}.
Each change is
{seq, key, event, value} where event is "inserted" (covers create and
update) or "removed". Pass the returned next_seq back as since_seq on
the next call to resume exactly where you left off. If the bounded buffer
has discarded part of that history, cursor_expired is true and
oldest_seq identifies the earliest retained record.
Args:
scope: Owner/user id whose memory to watch (keyspace mem_).
Use "shared" for the common keyspace — the usual choice when
coordinating between agents.
keyspace: Explicit keyspace override (advanced; bypasses scope).
timeout_sec: How long to wait before giving up (default 30). On timeout
the result is empty with timed_out: true — that is a
normal outcome, not an error.
since_seq: Resume cursor from a previous call. Omit on the first call to
watch only for changes from now on.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "montycat_await_memory_change"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| scope | No | ||
| keyspace | No | ||
| since_seq | No | ||
| timeout_sec | No |