Skip to main content
Glama
al-one

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

钉钉群机器人-发送文本消息

ding_send_text

Send text or Markdown messages to DingTalk group bots for notifications across multiple platforms including WeChat, Telegram, Bark, and Lark.

Instructions

钉钉群机器人发送文本或Markdown消息

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
textYes消息内容
titleNo消息标题
msgtypeNo内容类型,仅支持: text/markdownmarkdown
bot_keyNo钉钉群机器人access_token,默认从环境变量获取

Implementation Reference

  • Core implementation of the 'ding_send_text' tool: handles text/markdown messages, fetches bot_key from env if not provided, constructs API payload, and sends POST request to DingTalk robot endpoint.
    def ding_send_text(
        text: str = Field(description="消息内容"),
        title: str = Field("", description="消息标题"),
        msgtype: str = Field("markdown", description="内容类型,仅支持: text/markdown"),
        bot_key: str = Field("", description="钉钉群机器人access_token,默认从环境变量获取"),
    ):
        """
        https://open.dingtalk.com/document/development/custom-robots-send-group-messages
        """
        if msgtype == "markdown":
            body = {"title": title, "text": text}
        else:
            body = {"content": f'{title}\n{text}'.strip()}
        if not bot_key:
            bot_key = os.getenv("DINGTALK_BOT_KEY", "")
        base = os.getenv("DINGTALK_BASE_URL") or "https://oapi.dingtalk.com"
        res = requests.post(
            f"{base}/robot/send?access_token={bot_key}",
            json={"msgtype": msgtype, msgtype: body},
        )
        return res.json()
  • Pydantic Field definitions for tool parameters including descriptions, defaults, and validation hints.
        text: str = Field(description="消息内容"),
        title: str = Field("", description="消息标题"),
        msgtype: str = Field("markdown", description="内容类型,仅支持: text/markdown"),
        bot_key: str = Field("", description="钉钉群机器人access_token,默认从环境变量获取"),
    ):
  • @mcp.tool decorator registers the 'ding_send_text' tool with its title and description.
    @mcp.tool(
        title="钉钉群机器人-发送文本消息",
        description="钉钉群机器人发送文本或Markdown消息",
    )
  • Invocation of other.add_tools(mcp) which defines and registers the ding_send_text tool among others.
    other.add_tools(mcp)
Behavior2/5

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

With no annotations provided, the description carries full burden for behavioral disclosure. While it mentions sending messages, it doesn't describe what happens after sending (success/failure responses), rate limits, authentication requirements beyond the bot_key parameter, or whether messages are delivered synchronously/asynchronously. This leaves significant gaps for a messaging 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 extremely concise - a single sentence that directly states the tool's function. There's no wasted language or unnecessary elaboration, making it efficiently front-loaded with the essential information.

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?

For a messaging tool with no annotations and no output schema, the description is insufficiently complete. It doesn't explain what happens after sending (success indicators, error conditions), doesn't mention rate limits or authentication context beyond the bot_key parameter, and provides no guidance on when this tool should be selected over similar messaging tools in the sibling list.

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?

With 100% schema description coverage, the schema already documents all 4 parameters thoroughly. The description adds no additional parameter information beyond what's in the schema, so it meets the baseline expectation but doesn't provide extra value. The description mentions '文本或Markdown消息' which aligns with the msgtype parameter but doesn't elaborate further.

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 the action ('发送文本或Markdown消息') and target resource ('钉钉群机器人'), making the purpose immediately understandable. It doesn't explicitly distinguish from sibling tools like 'lark_send_text' or 'wework_send_text', but the mention of '钉钉群机器人' provides some differentiation by platform.

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 different messaging platforms (Lark, WeWork, Telegram, etc.), there's no indication of when DingTalk is preferred or what specific scenarios it's designed for.

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