notification_send
Send desktop notifications on Linux systems to display alerts, reminders, or status updates directly to the user's screen.
Instructions
Send a desktop notification
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| title | Yes | ||
| body | Yes |
Implementation Reference
- src/linux_mcp/tools/__init__.py:256-268 (handler)The core function that executes the notify-send command for the notification_send tool.
def execute_notification_send(title: str, body: str) -> str: """Send a desktop notification.""" try: subprocess.run( ["notify-send", title, body], capture_output=True, timeout=5, ) return f"Sent: {title}" except FileNotFoundError: return "(notify-send not available)" except Exception as e: return f"Notification failed: {e}" - src/linux_mcp/mcp/__init__.py:93-99 (handler)The MCP handler function that validates arguments and invokes the execution logic for notification_send.
async def handle_notification_send(arguments: dict[str, Any]) -> list[TextContent]: """Handle notification_send tool calls.""" if not arguments or "title" not in arguments or "body" not in arguments: return [TextContent(type="text", text="Error: missing parameters")] result = execute_notification_send(arguments["title"], arguments["body"]) return [TextContent(type="text", text=result)] - src/linux_mcp/mcp/__init__.py:112-112 (registration)The tool handler registration in the TOOL_HANDLERS dictionary.
"notification_send": handle_notification_send,