Skip to main content
Glama

message_complete_notification

Signal the end of a response by notifying users once per message. Use this tool to confirm task completion, summarize actions, or mark the conclusion of a multi-step process. Ensures clarity and proper response closure.

Instructions

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
messageYesNotification body
projectNameYesNotification title

Implementation Reference

  • The handler function for the message_complete_notification tool. It destructures projectName and message from args, sends an OS notification using node-notifier, and returns a confirmation text content block.
    (args) => { // Use inferred args type const { projectName, message } = args; notifier.notify({ title: projectName, message }); return { content: [{ type: 'text', text: 'Notification sent.' }] }; },
  • src/index.ts:153-169 (registration)
    Registers the message_complete_notification tool on the MCP server using server.tool(), conditionally if enabled. Imports and uses description and schema from the tool definition module, with an inline handler function.
    if (isToolEnabled('message_complete_notification')) { // Use properties from the imported tool object 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.' }] }; }, ); }
  • Defines the Zod schema (raw shape) for input validation of projectName and message parameters, and exports the complete ToolDefinition including capability, description, and schema.
    const rawSchema: ZodRawShape = { projectName: z.string().describe('Notification title'), message: z.string().describe('Notification body'), }; // Combine into a single ToolDefinition object export const messageCompleteNotificationTool: ToolDefinition = { capability: capabilityInfo, description: registrationDescription, schema: rawSchema, // Use the raw shape here };
  • Defines the ToolCapabilityInfo including the JSON Schema-like parameters structure (type, properties, required) advertised to MCP clients for the tool's input schema.
    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'], }, };

Other Tools

Related Tools

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