Skip to main content
Glama
zhiyingzzhou

AI Notify MCP

by zhiyingzzhou

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)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
responseLengthNoLength of the response (optional)

Implementation Reference

  • 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,
          },
        },
      },
    },
  • 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,
        },
      },
    },

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/zhiyingzzhou/ai-notify-mcp'

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