Skip to main content
Glama

wework_send_image

Send image messages to WeWork group chats using a bot. Provide an image URL and optional bot key to deliver visual content through the Notify MCP Server.

Instructions

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

Input Schema

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

Implementation Reference

  • Handler function that downloads image from URL, base64 encodes it, computes MD5, and sends via WeWork 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()
  • Registers the wework_send_image tool with title and description using @mcp.tool decorator.
    @mcp.tool( title="企业微信群机器人-发送图片消息", description="通过企业微信群机器人发送图片消息", )
  • Creates FastMCP instance and calls add_tools from wework.py (among others), which registers the tool.
    mcp = FastMCP(name="mcp-notify", version="0.1.7") wework.add_tools(mcp) tgbot.add_tools(mcp) other.add_tools(mcp) hass.add_tools(mcp) util.add_tools(mcp)
  • Pydantic schema definitions for tool parameters using Field.
    url: str = Field(description="图片url"), bot_key: str = FIELD_BOT_KEY,

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/aahl/mcp-notify'

If you have feedback or need assistance with the MCP directory API, please join our Discord server