Skip to main content
Glama
al-one

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

Bark推送通知

bark_send_notify

Send customizable push notifications to iOS devices via Bark, supporting title, body, subtitle, device key, URL, icon, interrupt level, and volume.

Instructions

通过Bark推送通知

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
bodyYes推送内容
titleNo推送标题
subtitleNo推送副标题
device_keyNo设备key,默认从环境变量获取
urlNo点击推送时,跳转的URL ,支持URL Scheme 和 Universal Link
iconNo自定义图标URL
levelNo推送中断级别。critical: 重要警告, 在静音模式下也会响铃active:默认值,系统会立即亮屏显示通知timeSensitive:时效性通知,可在专注状态下显示通知。passive:仅将通知添加到通知列表,不会亮屏提醒。active
volumeNo重要警告的通知音量(0-10),默认为5

Implementation Reference

  • The actual handler function for the 'bark_send_notify' tool. It sends a push notification via the Bark API (https://api.day.app) using the provided parameters (body, title, subtitle, device_key, url, icon, level, volume). Falls back to env vars for device_key and base URL.
    def bark_send_notify(
        body: str = Field(description="推送内容"),
        title: str = Field("", description="推送标题"),
        subtitle: str = Field("", description="推送副标题"),
        device_key: str = Field("", description="设备key,默认从环境变量获取"),
        url: str = Field("", description="点击推送时,跳转的URL ,支持URL Scheme 和 Universal Link"),
        icon: str = Field("", description="自定义图标URL"),
        level: str = Field(
            "active",
            description="推送中断级别。"
                        "critical: 重要警告, 在静音模式下也会响铃"
                        "active:默认值,系统会立即亮屏显示通知"
                        "timeSensitive:时效性通知,可在专注状态下显示通知。"
                        "passive:仅将通知添加到通知列表,不会亮屏提醒。",
        ),
        volume: int = Field(5, description="重要警告的通知音量(0-10),默认为5"),
    ):
        """
        https://bark.day.app/#/tutorial
        """
        if not device_key:
            device_key = os.getenv("BARK_DEVICE_KEY", "")
        base = os.getenv("BARK_BASE_URL") or "https://api.day.app"
        res = requests.post(
            f"{base}/{device_key}",
            json={
                "body": body,
                "title": title,
                "subtitle": subtitle,
                "url": url,
                "icon": icon,
                "level": level,
                "volume": volume,
            },
        )
        return res.json()
  • The @mcp.tool decorator registering 'bark_send_notify' with FastMCP, providing its title and description.
    @mcp.tool(
        title="Bark推送通知",
        description="通过Bark推送通知",
    )
  • The function signature defines the input schema using Pydantic Field descriptors for all parameters (body, title, subtitle, device_key, url, icon, level, volume).
    def bark_send_notify(
        body: str = Field(description="推送内容"),
        title: str = Field("", description="推送标题"),
        subtitle: str = Field("", description="推送副标题"),
        device_key: str = Field("", description="设备key,默认从环境变量获取"),
        url: str = Field("", description="点击推送时,跳转的URL ,支持URL Scheme 和 Universal Link"),
        icon: str = Field("", description="自定义图标URL"),
        level: str = Field(
            "active",
            description="推送中断级别。"
                        "critical: 重要警告, 在静音模式下也会响铃"
                        "active:默认值,系统会立即亮屏显示通知"
                        "timeSensitive:时效性通知,可在专注状态下显示通知。"
                        "passive:仅将通知添加到通知列表,不会亮屏提醒。",
        ),
        volume: int = Field(5, description="重要警告的通知音量(0-10),默认为5"),
    ):
Behavior2/5

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

No annotations are provided, so the description must fully convey behavior. It only states the basic function without disclosing traits like network dependency, error handling, or asynchronicity. For a sending tool, this lacks necessary behavioral context.

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

Conciseness4/5

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

The description is a single concise sentence with no wasted words. However, it could be slightly expanded to include more context without harming conciseness.

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

Completeness3/5

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

The tool has 8 parameters and no output schema. While the schema is descriptive, the description lacks information about return behavior or side effects, which is needed for a sending operation. It is minimally complete but could be better.

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% with clear parameter descriptions, so the tool description adds no extra value beyond the schema. Baseline 3 is appropriate as the schema does the heavy lifting, but the description itself is redundant.

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 clearly states '通过Bark推送通知' (Push notification via Bark), which identifies the specific service and action. However, among sibling tools like ntfy_send_notify or pushplus_send_msg, it doesn't differentiate Bark from other services, so it lacks sibling distinction.

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 guidance on when to use this tool versus alternatives like ntfy_send_notify or tg_send_message. There is no mention of prerequisites, context, or exclusions, making it hard for an agent to choose correctly.

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