Skip to main content
Glama
al-one

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

wework_send_image

Send image messages to WeChat Work group chats using a bot. Provide an image URL to share visual content with team members through automated notifications.

Instructions

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

Input Schema

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

Implementation Reference

  • The handler function that implements the core logic of the 'wework_send_image' tool. It downloads the image from the given URL, base64-encodes the content, computes its MD5 hash, and sends it to the WeWork group robot webhook.
    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 @mcp.tool decorator registers the 'wework_send_image' tool with FastMCP, providing its title and description.
    @mcp.tool( title="企业微信群机器人-发送图片消息", description="通过企业微信群机器人发送图片消息", )
  • Top-level registration call that invokes add_tools on the wework module to register all its tools, including 'wework_send_image', to the main FastMCP instance.
    wework.add_tools(mcp)
  • Pydantic Field definitions used for input schema validation of bot_key (and to_user in other tools). bot_key defaults from env var WEWORK_BOT_KEY.
    FIELD_BOT_KEY = Field("", description="企业微信群机器人key,uuid格式,默认从环境变量获取") FIELD_TO_USER = Field("", description="接收消息的成员ID,多个用`|`分隔,为`@all`时向该企业应用全部成员发送,默认从环境变量获取")

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