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
| Name | Required | Description | Default |
|---|---|---|---|
| title | Yes | Notification title | |
| message | Yes | Notification message | |
| sound | No | Play sound with notification |
Implementation Reference
- src/categories/notifications.ts:49-51 (handler)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"], },
- src/framework.ts:222-231 (registration)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);