Skip to contents

Sends notifications/resources/updated to the MCP clients subscribed to a resource, while a tool, a resource, a prompt or a completion function runs, so they read it again. Outside a server, it only checks its argument, so the function stays callable anywhere. Over HTTP, a client gets the notification on the stream it opens with a GET, or, for a 2026-07-28 client, on the stream of its subscriptions/listen.

Usage

notify_resource_updated(uri)

Arguments

uri

The URI of the resource that changed, as the clients subscribed to it.

Value

NULL, invisibly.

Examples

# Outside a server, it only checks its argument.
notify_resource_updated(
  "runlog://surfaces"
)