Skip to main content
Glama
al-one

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

企业微信群机器人-发送图片消息

wework_send_image

Send an image message to a WeChat Work group using a robot. Provide the image URL and optionally a bot key to notify group members.

Instructions

通过企业微信群机器人发送图片消息

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
urlYes图片url
bot_keyNo企业微信群机器人key,uuid格式,默认从环境变量获取

Implementation Reference

  • The `wework_send_image` function is the handler for the 'wework_send_image' MCP tool. It downloads an image from a URL, base64-encodes it, computes its MD5 hash, and sends it as an image message via the WeChat Work (企业微信) group bot webhook API.
    def wework_send_image(
        url: str = Field(description="图片url"),
        bot_key: str = FIELD_BOT_KEY,
    ):
        res = requests.get(url, timeout=120)
        res.raise_for_status()
        b64str = base64.b64encode(res.content).decode()
        md5str = hashlib.md5(res.content).hexdigest()
        res = requests.post(
            f"{WEWORK_BASE_URL}/cgi-bin/webhook/send?key={bot_key or WEWORK_BOT_KEY}",
            json={"msgtype": "image", "image": {"base64": b64str, "md5": md5str}},
            timeout=120,
        )
        return res.json()
  • The function signature uses Pydantic Field for schema definitions: `url` (str, required, description '图片url') and `bot_key` (str, defaults from global FIELD_BOT_KEY env variable).
    def wework_send_image(
        url: str = Field(description="图片url"),
        bot_key: str = FIELD_BOT_KEY,
  • The tool is registered via the `@mcp.tool()` decorator with title '企业微信群机器人-发送图片消息' and description '通过企业微信群机器人发送图片消息', inside the `add_tools(mcp)` function.
    @mcp.tool(
        title="企业微信群机器人-发送图片消息",
        description="通过企业微信群机器人发送图片消息",
    )
Behavior2/5

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

No annotations are provided, and the description only states the action without disclosing any behavioral traits such as authentication requirements, rate limits, or side effects. The agent receives no additional context beyond the basic function.

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 that directly states the tool's purpose. It is appropriately brief with no extraneous content.

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?

Given the tool's simplicity (two parameters, no output schema, no nested objects), the description is minimally adequate. However, it lacks any behavioral context or return value information that could help the agent understand the outcome of the operation.

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?

The input schema has 100% description coverage for its two parameters, so the schema itself provides adequate meaning. The description adds no extra parameter information, meeting the baseline for complete schema 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 clearly states the tool sends image messages via the WeWork group robot. However, it does not differentiate from the sibling tool 'wework_app_send_image', which also sends images but via the WeWork app.

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 is provided on when to use this tool versus other WeWork messaging tools (e.g., wework_send_text, wework_send_news). The description only implies usage for sending images.

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