Skip to main content
Glama
al-one

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

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

wework_send_image

Send image notifications to WeChat Work group chats using a bot. Provide an image URL to automatically share visual updates or alerts with team members.

Instructions

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

Input Schema

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

Implementation Reference

  • The core handler function for the 'wework_send_image' tool. It fetches the image from the provided URL, base64-encodes it, computes its MD5 hash, and sends it as an image message via the WeWork group robot webhook API.
    @mcp.tool(
        title="企业微信群机器人-发送图片消息",
        description="通过企业微信群机器人发送图片消息",
    )
    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()
  • Registers all tools from the wework module, including 'wework_send_image', by calling its add_tools function on the FastMCP instance.
    wework.add_tools(mcp)
  • Pydantic Field definitions used as default parameters for tool schemas, including bot_key for wework_send_image.
    FIELD_BOT_KEY = Field("", description="企业微信群机器人key,uuid格式,默认从环境变量获取")
    FIELD_TO_USER = Field("", description="接收消息的成员ID,多个用`|`分隔,为`@all`时向该企业应用全部成员发送,默认从环境变量获取")
Behavior2/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. While it indicates this is a sending/mutation operation (implying it makes external changes), it doesn't describe authentication requirements (bot_key handling), rate limits, error conditions, or what happens on success/failure. For a tool that interacts with external APIs and has no annotation coverage, this is a significant gap in behavioral transparency.

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 Chinese sentence that directly states the tool's purpose. There's zero wasted language, and it's front-loaded with the essential information. Every word earns its place in this minimal description.

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 this is a mutation tool (sending images to external systems) with no annotations, no output schema, and multiple similar sibling tools, the description is insufficiently complete. It doesn't address authentication (bot_key handling), error conditions, success responses, or differentiation from similar tools. For a tool that modifies external state, more contextual information would be helpful.

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%, so the schema already documents both parameters (url and bot_key) with their descriptions. The tool description doesn't add any additional parameter semantics beyond what's in the schema. The baseline score of 3 is appropriate when the schema does the heavy lifting for parameter documentation.

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 ('发送图片消息' - send image message) and the target resource ('企业微信群机器人' - WeWork group robot). It specifies the type of content being sent (image), which distinguishes it from text or other media types. However, it doesn't explicitly differentiate from sibling tools like 'wework_send_text' or 'wework_app_send_image' beyond the image focus.

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 WeWork-related sibling tools (wework_send_text, wework_app_send_image, wework_app_send_file, etc.), there's no indication of when this specific tool is appropriate versus the app versions or other media types. It simply states what the tool does without contextual usage information.

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