Skip to main content
Glama

SystemPrompt MCP Notion Server

notifications.ts1.27 kB
import { PromptListChangedNotification, ResourceListChangedNotification, } from "@modelcontextprotocol/sdk/types.js"; import { SystemPromptService } from "../services/systemprompt-service.js"; import { mapPromptsToListPromptsResult, mapBlocksToListResourcesResult, } from "../utils/mcp-mappers.js"; import { server } from "../server.js"; export async function sendPromptChangedNotification(): Promise<void> { const service = SystemPromptService.getInstance(); const prompts = await service.getAllPrompts(); const notification: PromptListChangedNotification = { method: "notifications/prompts/list_changed", params: mapPromptsToListPromptsResult(prompts), }; await sendNotification(notification); } export async function sendResourceChangedNotification(): Promise<void> { const service = SystemPromptService.getInstance(); const blocks = await service.listBlocks(); const notification: ResourceListChangedNotification = { method: "notifications/resources/list_changed", params: mapBlocksToListResourcesResult(blocks), }; await sendNotification(notification); } async function sendNotification( notification: PromptListChangedNotification | ResourceListChangedNotification ) { await server.notification(notification); }

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/Ejb503/systemprompt-mcp-notion'

If you have feedback or need assistance with the MCP directory API, please join our Discord server