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
| Name | Required | Description | Default |
|---|---|---|---|
| message | Yes | Notification body | |
| projectName | Yes | Notification title |
Implementation Reference
- src/index.ts:162-173 (handler)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,