Skip to main content
Glama

message_complete_notification

Signal the completion of a response or task by sending a notification. Use this tool once per message to clearly indicate when an action or query has finished, ensuring users are informed of the end of a process.

Instructions

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
messageYesNotification body
projectNameYesNotification title

Implementation Reference

  • Handler function that sends an OS notification using node-notifier based on projectName and message, and returns a confirmation text response.
    (args) => { // Use inferred args type const { projectName, message } = args; notifier.notify({ title: projectName, message }); return { content: [ { type: 'text', text: 'Notification sent. You can now wait for user input.', }, ], };
  • Zod schema raw shape defining input parameters for the tool: projectName (string) and message (string).
    const rawSchema: ZodRawShape = { projectName: z.string().describe('Notification title'), message: z.string().describe('Notification body'), };
  • src/index.ts:153-176 (registration)
    Conditional registration of the 'message_complete_notification' tool on the MCP server using server.tool(), including description, schema, and handler.
    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. You can now wait for user input.', }, ], }; }, ); }
  • ToolCapabilityInfo containing the JSON schema for parameters (equivalent to Zod schema) used in tool capabilities declaration.
    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'], }, };
  • src/index.ts:30-30 (registration)
    Includes the tool capability in the allToolCapabilities object, which is filtered and used for server capabilities.
    message_complete_notification: messageCompleteNotificationTool.capability,

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

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