Expand description
Gotify MCP - subscribe to + read from external notifications
(mcp__forge__gotify__*).
A forge session subscribes the configured Gotify server; matching
notifications deliver into the session as a user-turn, spawning it if
asleep. gotify__subscribe / gotify__list / gotify__unsubscribe
manage the callerβs OWN subscriptions - a lead the leadβs, a worker
its own, neither the otherβs; gotify__apps / gotify__recent are
read-only server queries (application names, recent-notification
catch-up). All are ANY-CALLER - mirroring the cron family, not the
lead-only agents verbs, down to the owner scoping on list + remove.
facade- theGotifyFacadeseam (prod overWeak<Workspace>+ a mock for tool tests).
Re-exportsΒ§
use std::sync::Arc;πuse forge_sdk::mcp::server::McpServerBuilder;πuse forge_sdk::mcp::tool::Tool;πuse forge_sdk::mcp::tool::ToolInput;πuse forge_sdk::mcp::tool::ToolOutput;πuse forge_connectors::gotify::GotifyRecent;πuse forge_primitives::GotifySubscription;πuse uuid::Uuid;πuse crate::SessionSlot;πuse crate::mcp::gotify::facade::GotifyFacade;πuse crate::mcp::gotify::facade::GotifyReadError;πuse crate::mcp::gotify::facade::GotifySubscribeError;πuse crate::mcp::gotify::facade::GotifyUnsubscribeError;π
ModulesΒ§
- facade π
GotifyFacade- the seam between the Gotify MCP tools and workspace state. The production impl (ProdGotifyFacade) resolves the callerβs project + durable identity and drives the directWorkspacesubscription methods; the mock records calls for tool tests.- types
- Wire-shape type for a matched Gotify notification on its way into a subscriberβs chat.
StructsΒ§
- Apps π
- List π
- Recent π
- Recent
Args π - Subscribe π
- Subscribe
Args π - Unsubscribe π
- Unsubscribe
Args π
ConstantsΒ§
- DEFAULT_
RECENT_ πLIMIT - Default notification count for
gotify__recentwhenlimitis omitted.
FunctionsΒ§
- add_
tools π - Attach the five Gotify tools to an existing
McpServerBuilder. Called for BOTH lead and worker sessions (any-caller), sobuild_forge_serverinvokes this unconditionally.apps/recentare server-global reads and donβt take the caller slot. - format_
read_ πerror - format_
subscribe_ πerror - recent_
to_ πjson - sub_
to_ πjson - Readable JSON for one subscription (the tool-output shape the LLM
sees), shared by the
gotify__listrows and thegotify__unsubscribeecho. Noteam_role: both show only the callerβs own, so the field could carry just one value, andcron_to_jsonomits it for the same reason. - tool_
error π