send_notification
Display native system notifications with custom titles and messages across Windows, macOS, and Linux platforms.
Instructions
Send a system notification.
Displays a native operating system notification with the specified title and message.
Works across Windows, macOS, and Linux platforms.
Args:
title: The title of the notification (required)
message: The message body of the notification (required)
app_name: The name of the application sending the notification (optional)
timeout: Duration in seconds to display the notification (default: 10)
Returns:
A success message if the notification was sent successfully, or an error message if it failed.
Examples:
send_notification("Task Complete", "Your build has finished successfully")
send_notification("Warning", "Low disk space detected", app_name="System Monitor", timeout=5)
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| title | Yes | ||
| message | Yes | ||
| app_name | No | ||
| timeout | No |
Implementation Reference
- src/server.py:53-93 (handler)The main handler function for the 'send_notification' MCP tool. It sends a native desktop notification using the plyer library, handling parameters for title, message, app_name, and timeout. Includes comprehensive docstring with args, returns, and examples.@mcp.tool(annotations=ToolAnnotations(readOnlyHint=True)) def send_notification( title: str, message: str, app_name: str | None = None, timeout: int = 10, ) -> str: """ Send a system notification. Displays a native operating system notification with the specified title and message. Works across Windows, macOS, and Linux platforms. Args: title: The title of the notification (required) message: The message body of the notification (required) app_name: The name of the application sending the notification (optional) timeout: Duration in seconds to display the notification (default: 10) Returns: A success message if the notification was sent successfully, or an error message if it failed. Examples: send_notification("Task Complete", "Your build has finished successfully") send_notification("Warning", "Low disk space detected", app_name="System Monitor", timeout=5) """ try: notification_params = { "title": title, "message": message, "timeout": timeout, } if app_name: notification_params["app_name"] = app_name notification.notify(**notification_params) return f"Notification sent successfully: '{title}'" except Exception as e: return f"Error sending notification: {e}"