{{ message }}
notifications/reminder: a server → host ambient-context signal for agent turns #3007
kennethsinder
started this conversation in
Ideas - General
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment

Uh oh!
There was an error while loading. Please reload this page.
-
Problem
MCP servers have a good vocabulary for telling a host that state changed:
notifications/resources/updated: a resource's contents changed; invalidate caches.notifications/resources/list_changed,notifications/tools/list_changed,notifications/prompts/list_changed: a catalog changed.notifications/progress: a long-running request made progress.notifications/message: server-side logging.None of these model a short, turn-scoped fact the server wants the agent to see before its next model call. Concrete cases that come up with watcher-style servers:
src/lib.rsin another editor while the agent was working. The agent should re-read the file before its next edit.cargo checkgo green after the agent's last change.Hosts already solve this internally: several coding agents inject ambient "system reminder"-style context blocks at turn boundaries (Claude Code's
<system-reminder>pattern is the most visible public example). But an MCP server has no standard way to feed that channel. Today implementors pick one of three workarounds:notifications/resources/updatedand rely on an out-of-band convention that the host will re-read and surface the change to the model. Fragile, and the server (the domain expert on why the event matters) never gets to phrase it.notifications/message(logging) ornotifications/progresswith reminder text. Wrong primitive; hosts route those to logs and progress UI, not model context.Proposal
A new server-initiated notification:
{ "jsonrpc": "2.0", "method": "notifications/reminder", "params": { "reminder": { "id": "0190abcd-2024-7c1d-bb02-3a0e8a44d7f0", "body": "src/lib.rs changed externally; re-read it before editing.", "tags": ["workspace", "file_changed"], "dedupeKey": "file_changed:src/lib.rs", "ttlTurns": 2, "roleHint": "system" }, "_meta": {} } }bodyis the only required content field: natural-language text the host may place into the agent's next turn (as a system/developer block;roleHintis advisory).dedupeKey: a newer reminder replaces older pending ones with the same key, so a chatty watcher collapses to one line instead of flooding the transcript.ttlTurns: the reminder stops being rendered after N turns; stale facts age out instead of accumulating.Servers declare the capability at
initialize(capabilities.reminders.emit: true); hosts SHOULD ignore the notification from servers that didn't declare it, consistent with the existing tolerance rule for unknown messages.Why not
notifications/resources/updated?They compose rather than compete.
resources/updatedis a cache-invalidation signal about host-side state; nothing reaches the model unless the host invents a synthetic nudge and its own wording.notifications/reminderis "tell the agent X happened, in the server's words, on its next turn." A well-behaved watcher server emits both:resources/updatedso caches invalidate, and a reminder so the agent learns about it in time to act.Open questions
notifications/reminder(matchingnotifications/progress) vs something namespaced.tools/call)?roleHintvalues: standardize provider-specific hints, or keep justsystem/developer?notifications/message?If maintainers think this is worth pursuing, I'm happy to write it up through the SEP process at whatever scope fits. There is a working implementation of this shape behind
_metatoday, so the proposal comes from running code rather than a sketch.Disclosure: I drafted this with AI assistance and reviewed it before posting; the design and the reference implementation are human-maintained.
Beta Was this translation helpful? Give feedback.
All reactions