Skip to main content
Glama

notifications_send_notification

Send system notifications on macOS with custom titles, messages, and optional sound playback through AppleScript integration.

Instructions

[Notification management] Send a system notification

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
titleYesNotification title
messageYesNotification message
soundNoPlay sound with notification

Implementation Reference

  • The handler function that generates AppleScript code to display a macOS system notification with the given title, message, and optional sound.
    script: (args) => `
      display notification "${args.message}" with title "${args.title}" ${args.sound ? 'sound name "default"' : ""}
    `,
  • Input schema defining parameters for the notification: required title and message strings, optional sound boolean.
    schema: {
      type: "object",
      properties: {
        title: {
          type: "string",
          description: "Notification title",
        },
        message: {
          type: "string",
          description: "Notification message",
        },
        sound: {
          type: "boolean",
          description: "Play sound with notification",
          default: true,
        },
      },
      required: ["title", "message"],
    },
  • Registers the tool in the MCP server by dynamically constructing the tool name as 'category_script' (e.g., 'notifications_send_notification') and providing schema and description.
    tools: this.categories.flatMap((category) =>
      category.scripts.map((script) => ({
        name: `${category.name}_${script.name}`, // Changed from dot to underscore
        description: `[${category.description}] ${script.description}`,
        inputSchema: script.schema || {
          type: "object",
          properties: {},
        },
      })),
    ),
  • src/index.ts:29-29 (registration)
    Registers the notifications category containing the send_notification script with the MCP server.
    server.addCategory(notificationsCategory);

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/joshrutkowski/applescript-mcp'

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