Skip to main content
Glama
al-one

MCP Server for notify to weixin / telegram / bark / lark

Ntfy Push Notification

ntfy_send_notify

Push a notification via Ntfy with customizable message, title, priority, delay, and actions.

Instructions

Push a notification via Ntfy

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
messageYesNotification message body; set to `triggered` if empty or not passed
titleNoNotification title
topicNoTarget topic name or URL
clickNoURL opened when notification is clicked
attachNoURL of an attachment
iconNoURL of notification icon
markdownNoSet to `true` if the message is Markdown-formatted
filenameNoFile name of the attachment
priorityNoMessage priority with 1=min, 3=default and 5=max
delayNoTimestamp or duration for delayed delivery. Example: 30min, 9am
actionsNoList of action buttons. The following actions are supported: - view: Opens a website or app when the action button is tapped - broadcast: Sends an Android broadcast intent when the action button is tapped (only supported on Android) - http: Sends HTTP POST/GET/PUT request when the action button is tapped ```json [ { "action": "view", "label": "Open portal", "url": "https://home.nest.com/", "clear": true }, { "action": "http", "label": "Turn down", "url": "https://api.nest.com/", "body": "{"temperature": 65}" }, { "action": "broadcast", "label": "Take picture", "extras": { "cmd": "pic", "camera": "front" } } ] ```

Implementation Reference

  • Handler function that sends a push notification via Ntfy. Builds a JSON payload with topic, title, message, click URL, icon, markdown flag, priority, delay, optional attachment, and actions, then POSTs it to the configured Ntfy base URL.
    def ntfy_send_notify(
        message: str = Field(description="Notification message body; set to `triggered` if empty or not passed"),
        title: str = Field("", description="Notification title"),
        topic: str = Field("", description="Target topic name or URL"),
        click: str = Field("", description="URL opened when notification is clicked"),
        attach: str = Field("", description="URL of an attachment"),
        icon: str = Field("", description="URL of notification icon"),
        markdown: bool = Field(False, description="Set to `true` if the message is Markdown-formatted"),
        filename: str = Field("", description="File name of the attachment"),
        priority: int = Field(3, description="Message priority with 1=min, 3=default and 5=max"),
        delay: str = Field("", description="Timestamp or duration for delayed delivery. Example: 30min, 9am"),
        actions: list | None = Field(None, description=f"List of action buttons.{NTFY_ACTIONS_RULE}"),
    ):
        """
        https://docs.ntfy.sh/publish/#publish-as-json
        """
        base = os.getenv("NTFY_BASE_URL") or "https://ntfy.sh"
        if topic and topic.startswith("http"):
            base, topic = topic.rsplit("/", 1)
        if not topic:
            topic = os.getenv("NTFY_DEFAULT_TOPIC", "")
        data = {
            "topic": topic,
            "title": title,
            "message": message,
            "click": click,
            "icon": icon,
            "markdown": markdown or False,
            "priority": priority,
            "delay": delay,
        }
        if attach:
            data["attach"] = attach
            data["filename"] = filename
        if actions:
            data["actions"] = actions
        res = requests.post(f"{base}", json=data)
        return res.json()
  • Input schema for ntfy_send_notify using Pydantic Field definitions. Supports message, title, topic, click, attach, icon, markdown, filename, priority, delay, and actions parameters.
    message: str = Field(description="Notification message body; set to `triggered` if empty or not passed"),
    title: str = Field("", description="Notification title"),
    topic: str = Field("", description="Target topic name or URL"),
    click: str = Field("", description="URL opened when notification is clicked"),
    attach: str = Field("", description="URL of an attachment"),
    icon: str = Field("", description="URL of notification icon"),
    markdown: bool = Field(False, description="Set to `true` if the message is Markdown-formatted"),
    filename: str = Field("", description="File name of the attachment"),
    priority: int = Field(3, description="Message priority with 1=min, 3=default and 5=max"),
    delay: str = Field("", description="Timestamp or duration for delayed delivery. Example: 30min, 9am"),
    actions: list | None = Field(None, description=f"List of action buttons.{NTFY_ACTIONS_RULE}"),
  • Registration of the 'ntfy_send_notify' function as an MCP tool via the @mcp.tool() decorator with title 'Ntfy Push Notification' and description 'Push a notification via Ntfy'.
    @mcp.tool(
        title="Ntfy Push Notification",
        description="Push a notification via Ntfy",
    )
  • Module-level registration: 'other.add_tools(mcp)' is called, which is the function that contains the @mcp.tool decorator for ntfy_send_notify.
    mcp = FastMCP(name="mcp-notify", version="0.1.11")
    wework.add_tools(mcp)
    tgbot.add_tools(mcp)
    other.add_tools(mcp)
    hass.add_tools(mcp)
    util.add_tools(mcp)
  • Helper constant NTFY_ACTIONS_RULE providing documentation for the 'actions' parameter, describing view, broadcast, and http action types with JSON examples.
    NTFY_ACTIONS_RULE = """
    The following actions are supported:
    - view: Opens a website or app when the action button is tapped
    - broadcast: Sends an Android broadcast intent when the action button is tapped (only supported on Android)
    - http: Sends HTTP POST/GET/PUT request when the action button is tapped
    ```json
    [
      {
        "action": "view",
        "label": "Open portal",
        "url": "https://home.nest.com/",
        "clear": true
      },
      {
        "action": "http",
        "label": "Turn down",
        "url": "https://api.nest.com/",
        "body": "{\"temperature\": 65}"
      },
      {
        "action": "broadcast",
        "label": "Take picture",
        "extras": {
            "cmd": "pic",
            "camera": "front"
        }
      }
    ]
    ```
    """
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No behavioral traits beyond the action are disclosed. Since no annotations are provided, the description should cover aspects like authentication, delivery guarantees, or side effects, but it does not. The agent has no insight into potential behaviors.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness2/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is extremely concise but at the expense of completeness. It is a single sentence that lacks structure and does not front-load critical information such as return values or usage context, making it less helpful than it could be.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool has 11 parameters, no output schema, and no annotations, the description is severely incomplete. It omits return format, failure modes, and any context for using the various parameters, leaving the agent without sufficient guidance.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so all parameters are already described in the input schema. The description adds no additional meaning, meeting the baseline of 3.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description 'Push a notification via Ntfy' clearly identifies the action and service, making the tool's purpose understandable despite its brevity. While it does not differentiate from siblings, the specific reference to Ntfy provides enough context for basic purpose clarity.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No usage guidelines are provided. The description fails to specify when to use this tool over sibling notification tools (e.g., bark_send_notify, tg_send_message), nor does it mention prerequisites or context for use.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

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/al-one/mcp-notify'

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