Skip to main content
Glama

企业微信应用号-发送视频消息

wework_app_send_video

Send a video notification to WeWork contacts by providing a video URL.

Instructions

通过企业微信应用号发送发送视频消息

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
urlYes视频URL
touserNo接收消息的成员ID,多个用`|`分隔,为`@all`时向该企业应用全部成员发送,默认从环境变量获取

Implementation Reference

  • The tool handler function for 'wework_app_send_video'. It takes a video URL and optional 'touser' parameter, then delegates to wework_send_media with msgtype='video'.
    def wework_app_send_video(
        url: str = Field(description="视频URL"),
        touser: str = FIELD_TO_USER,
    ):
        return wework_send_media(touser, url, "video")
  • The wework_send_media helper function, which handles uploading a media file to WeWork and sending it via the application message API. For videos, it downloads the file from the URL, uploads it as a 'video' media type, and sends the resulting media_id.
    def wework_send_media(touser, url: str, msgtype=None):
        if msgtype:
            pass
        elif '.jpg' in url.lower() or '.jpeg' in url.lower() or '.png' in url.lower():
            msgtype = 'image'
        elif '.mp4' in url.lower():
            msgtype = 'video'
        elif '.arm' in url.lower():
            msgtype = 'voice'
        else:
            msgtype = 'file'
        res = requests.get(url, timeout=120)
        res.raise_for_status()
        file = io.BytesIO(res.content)
        mine = res.headers.get("content-type") or "application/octet-stream"
        res = requests.post(
            f"{WEWORK_BASE_URL}/cgi-bin/media/upload",
            params={"type": msgtype, "access_token": get_access_token()},
            files={"media": ("filename", file, mine)},
            timeout=120,
        )
        media = res.json() or {}
        if not (media_id := media.get("media_id")):
            return media
        res = requests.post(
            f"{WEWORK_BASE_URL}/cgi-bin/message/send?access_token={get_access_token()}",
            json={
                "touser": touser or WEWORK_APP_TOUSER,
                "agentid": WEWORK_APP_AGENTID,
                "msgtype": msgtype,
                msgtype: {"media_id": media_id},
            },
        )
        return res.json()
  • The @mcp.tool decorator registering 'wework_app_send_video' as an MCP tool with title '企业微信应用号-发送视频消息' and description '通过企业微信应用号发送发送视频消息'.
    @mcp.tool(
        title="企业微信应用号-发送视频消息",
        description="通过企业微信应用号发送发送视频消息",
    )
  • Input parameters/schema for the tool: url (str, description='视频URL') and touser (str, reuse of FIELD_TO_USER).
    def wework_app_send_video(
        url: str = Field(description="视频URL"),
        touser: str = FIELD_TO_USER,
    ):
  • Registration of all WeWork tools (including wework_app_send_video) via wework.add_tools(mcp) call.
    mcp = FastMCP(name="mcp-notify", version="0.1.11")
    wework.add_tools(mcp)
Behavior2/5

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

No annotations are provided, so the description must carry the full burden of behavioral disclosure. It only states the action (sending a video) without mentioning permissions, rate limits, or expected results (e.g., success/error handling). The typo also reduces clarity.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single sentence but contains a repeated word ('发送发送'), indicating poor editing. It is concise but front-loads information poorly due to the redundancy.

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 the tool's simplicity (2 parameters, no output schema), the description is insufficient. It does not explain that 'touser' accepts multiple IDs or '@all', nor does it mention the return value (if any). The sibling context suggests many similar tools, so more context is needed.

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 covers 100% of parameters with descriptions, so the baseline is 3. The description adds no extra meaning beyond the schema; it does not explain the relationship between 'touser' and 'url' or provide usage examples.

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 title and description clearly state the tool sends video messages via WeChat Work app. However, the description merely restates the title with a typo (double '发送') and does not differentiate from sibling tools like 'wework_app_send_image' or 'wework_app_send_file', though the resource type (video) is unique.

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, such as 'wework_send_video' or other messaging tools. No prerequisites or context for selection are mentioned.

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

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