27 lines
952 B
Python
27 lines
952 B
Python
"""MCP-Server `notify`: Push-Nachricht auf Marcs Handy (Gotify, butler/notify.py).
|
||
|
||
Start: python -m butler.notify_server (GOTIFY_URL, GOTIFY_TOKEN; optional NOTIFY_CLICK_URL)
|
||
"""
|
||
from __future__ import annotations
|
||
|
||
from mcp.server.mcpserver import MCPServer
|
||
|
||
from . import notify as push
|
||
from .mcp_run import erwartet, starten
|
||
|
||
server = MCPServer("notify", instructions=(
|
||
"Push-Nachricht auf Marcs Handy (Gotify). Nur für Marc – Marisa nutzt keine Push-Nachrichten; fragt sie, sag "
|
||
"das. Kurz: das Wichtigste in 1–3 Zeilen (Markdown geht), Details im Chat."))
|
||
|
||
|
||
@server.tool()
|
||
@erwartet
|
||
def notify(message: str, title: str = "", priority: str = "default") -> dict:
|
||
"""Push-Nachricht auf Marcs Handy (max. 1000 Zeichen, Markdown). priority: min, low, default, high, urgent
|
||
(high/urgent nur bei Fristen in den nächsten Tagen)."""
|
||
return push.senden(message, title, priority)
|
||
|
||
|
||
if __name__ == "__main__":
|
||
starten(server)
|