Skip to main content
Glama
al-one

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

Bark推送通知

bark_send_notify

Send notifications via Bark with customizable title, body, priority levels, and optional URL redirects for iOS device alerts.

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 bark_send_notify tool handler: sends a push notification to Bark server using requests.post with configurable title, body, subtitle, device_key, url, icon, level, and volume. Retrieves defaults from environment variables.
    @mcp.tool(
        title="Bark推送通知",
        description="通过Bark推送通知",
    )
    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()
  • Registers the tools from the other.py module (including bark_send_notify) by calling its add_tools function on the MCP instance.
    other.add_tools(mcp)
Behavior2/5

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

No annotations are provided, so the description carries the full burden of behavioral disclosure. '推送通知' implies a write/send operation, but the description doesn't mention authentication requirements (e.g., device_key handling), rate limits, error conditions, or what happens on success/failure. It lacks critical behavioral context for a notification-sending tool.

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

Conciseness5/5

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

The description is a single, efficient sentence ('通过Bark推送通知') that directly states the tool's purpose without any fluff. It's appropriately sized and front-loaded, with every word contributing to clarity.

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 complexity of a notification tool with 8 parameters, no annotations, and no output schema, the description is incomplete. It doesn't address key contextual aspects like authentication (device_key handling), error handling, response format, or when to choose Bark over sibling tools, leaving significant gaps for an AI agent.

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 description coverage is 100%, with all 8 parameters well-documented in the schema (e.g., body as content, title, subtitle, device_key from env var, URL for redirection, icon URL, level with detailed enum-like explanation, volume 0-10). The description adds no parameter semantics beyond what the schema already provides, meeting the baseline for high coverage.

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 '通过Bark推送通知' clearly states the action (推送/push) and the resource (通知/notification) using the Bark service. It's specific about what the tool does, though it doesn't explicitly differentiate from sibling tools like 'ntfy_send_notify' which serves a similar notification purpose through a different service.

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?

The description provides no guidance on when to use this tool versus alternatives. With multiple sibling tools for notifications (e.g., ntfy_send_notify, pushplus_send_msg) and messaging (e.g., lark_send_text, tg_send_message), there's no indication of when Bark is preferred, what scenarios it's designed for, or any prerequisites 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