auto_notify_completion
Automatically sends system notifications when AI completes responses in MCP-compatible code editors, with cross-platform support for macOS, Windows, and Linux.
Instructions
Automatically show completion notification (call this after providing any response)
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "auto_notify_completion"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| responseLength | No | Length of the response (optional) |
Implementation Reference
- src/index.ts:213-242 (handler)The main handler logic for the 'auto_notify_completion' tool. It customizes the notification message based on the optional responseLength parameter and sends a system notification, then returns a confirmation message.
case 'auto_notify_completion': { const responseLength = (args?.responseLength as number) || 0; let autoMessage = '已完成回答'; if (responseLength > 0) { if (responseLength > 1000) { autoMessage = '已完成详细回答'; } else if (responseLength > 500) { autoMessage = '已完成回答'; } else { autoMessage = '已完成简短回答'; } } await notificationService.notify({ title: formatNotificationTitle('AI Notify', projectName), message: autoMessage, sound: true, icon: iconPath, }); return { content: [ { type: 'text', text: `🔔 自动通知已发送`, }, ], }; } - src/index.ts:164-178 (registration)The tool registration entry in the tools array, including name, description, and input schema. This is used by the MCP server to expose the tool.
{ name: 'auto_notify_completion', description: 'Automatically show completion notification (call this after providing any response)', inputSchema: { type: 'object', properties: { responseLength: { type: 'number', description: 'Length of the response (optional)', default: 0, }, }, }, }, - src/index.ts:168-177 (schema)Input schema definition for the 'auto_notify_completion' tool, specifying the optional responseLength parameter.
inputSchema: { type: 'object', properties: { responseLength: { type: 'number', description: 'Length of the response (optional)', default: 0, }, }, },