ConduitMcp.Notifications (ConduitMCP v0.11.0)

Copy Markdown View Source

Builders for server-to-client JSON-RPC notifications.

Each function returns a complete notification message ("jsonrpc", "method", optional "params", no "id") ready to hand to a transport. The shapes are identical in the 2025-11-25 and 2026-07-28 schemas; what differs is delivery. On the legacy era they travel over a session stream; on 2026-07-28 list-changed and resource-updated notifications are only delivered on a subscriptions/listen stream the client opened, and log messages only when the request's _meta opted in.

Summary

Functions

Builds a notifications/cancelled notification for request_id.

Builds a notifications/message log notification.

Builds a notifications/progress notification.

Builds a notifications/prompts/list_changed notification.

Builds a notifications/resources/list_changed notification.

Builds a notifications/resources/updated notification for uri.

Builds a notifications/subscriptions/acknowledged notification: the first message on a subscriptions/listen stream, carrying the filter subset the server honours (ConduitMcp.Subscriptions.Filter). 2026-07-28 only.

Builds a notifications/tools/list_changed notification.

Functions

cancelled_notification(request_id, reason \\ nil)

@spec cancelled_notification(String.t() | integer(), String.t() | nil) :: map()

Builds a notifications/cancelled notification for request_id.

A 2026-07-28 server sends it for one purpose only: to end the subscriptions/listen stream that request_id opened.

log_notification(level, data, opts \\ [])

@spec log_notification(String.t(), term(), keyword()) :: map()

Builds a notifications/message log notification.

level is an RFC 5424 level string ("debug" … "emergency"); data is any JSON-serializable value.

Options

  • :logger - the name of the logger issuing the message

progress_notification(progress_token, progress, opts \\ [])

@spec progress_notification(String.t() | integer(), number(), keyword()) :: map()

Builds a notifications/progress notification.

Options

  • :total - the total amount of work, when known
  • :message - a human-readable progress message

Example

ConduitMcp.Notifications.progress_notification("token-1", 50, total: 100)

prompt_list_changed_notification()

@spec prompt_list_changed_notification() :: map()

Builds a notifications/prompts/list_changed notification.

resource_list_changed_notification()

@spec resource_list_changed_notification() :: map()

Builds a notifications/resources/list_changed notification.

resource_updated_notification(uri)

@spec resource_updated_notification(String.t()) :: map()

Builds a notifications/resources/updated notification for uri.

subscriptions_acknowledged_notification(notifications)

@spec subscriptions_acknowledged_notification(map()) :: map()

Builds a notifications/subscriptions/acknowledged notification: the first message on a subscriptions/listen stream, carrying the filter subset the server honours (ConduitMcp.Subscriptions.Filter). 2026-07-28 only.

tool_list_changed_notification()

@spec tool_list_changed_notification() :: map()

Builds a notifications/tools/list_changed notification.