Skip to main content
Glama

message_complete_notification

Signal completion of responses in interactive MCP server sessions by sending cross-platform notifications when tasks or queries are finished.

Instructions

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
projectNameYesNotification title
messageYesNotification body

Implementation Reference

  • The handler function that executes the tool logic: extracts projectName and message from arguments, sends an OS notification using node-notifier, and returns a confirmation response.
    (args) => { // Use inferred args type const { projectName, message } = args; notifier.notify({ title: projectName, message }); return { content: [{ type: 'text', text: 'Notification sent.' }] }; },
  • src/index.ts:155-169 (registration)
    Registration of the message_complete_notification tool using server.tool(), including dynamic description handling, schema reference, and inline handler function.
    server.tool( 'message_complete_notification', // Description is a string here, but handle consistently typeof messageCompleteNotificationTool.description === 'function' ? messageCompleteNotificationTool.description(globalTimeoutSeconds) // Should not happen based on definition, but safe : messageCompleteNotificationTool.description, messageCompleteNotificationTool.schema, // Use schema property (args) => { // Use inferred args type const { projectName, message } = args; notifier.notify({ title: projectName, message }); return { content: [{ type: 'text', text: 'Notification sent.' }] }; }, ); }
  • Zod schema (raw shape) defining input parameters: projectName and message, used for input validation.
    const rawSchema: ZodRawShape = { projectName: z.string().describe('Notification title'), message: z.string().describe('Notification body'), };
  • ToolCapabilityInfo including JSON schema for parameters (input schema advertised to MCP client).
    const capabilityInfo: ToolCapabilityInfo = { description: 'Notify when a response has completed via OS notification.', parameters: { type: 'object', properties: { projectName: { type: 'string', description: 'Identifies the context/project making the notification (appears in notification title)', }, message: { type: 'string', description: 'The specific notification text (appears in the body)', }, }, required: ['projectName', 'message'], }, };
  • Export of the ToolDefinition object aggregating capability, description, and schema, imported and used for registration in index.ts.
    export const messageCompleteNotificationTool: ToolDefinition = { capability: capabilityInfo, description: registrationDescription, schema: rawSchema, // Use the raw shape here };

Latest Blog Posts

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/mikeysrecipes/interactive-mcp'

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