pushplus_send_msg
Send notifications through PushPlus to deliver messages via WeChat, email, or webhooks. Configure content format and channels for cross-platform alerts.
Instructions
通过PushPlus(推送加)推送消息
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| content | Yes | 消息内容 | |
| title | No | 消息标题 | |
| token | No | 用户token,默认从环境变量获取 | |
| template | No | 消息内容格式: `html`(默认)/`txt`/`markdown` | |
| channel | No | 发送渠道: `wechat`(默认)/`webhook`/`mail` |
Implementation Reference
- mcp_notify/other.py:194-216 (handler)The handler function for the 'pushplus_send_msg' tool. It retrieves the token from environment if not provided, constructs the API URL, and sends a POST request with the message details to the PushPlus service.def pushplus_send_msg( content: str = Field(description="消息内容"), title: str = Field("", description="消息标题"), token: str = Field("", description="用户token,默认从环境变量获取"), template: str = Field("", description="消息内容格式: `html`(默认)/`txt`/`markdown`"), channel: str = Field("", description="发送渠道: `wechat`(默认)/`webhook`/`mail`"), ): """ https://www.pushplus.plus/doc/guide/api.html """ if not token: token = os.getenv("PUSH_PLUS_TOKEN", "") base = os.getenv("PUSH_PLUS_BASE_URL") or "http://www.pushplus.plus" res = requests.post( f"{base}/{token}", json={ "content": content, "title": title, "template": template, "channel": channel, }, ) return res.json()
- mcp_notify/other.py:195-200 (schema)Pydantic Field definitions providing input schema, descriptions, and default values for the tool parameters.content: str = Field(description="消息内容"), title: str = Field("", description="消息标题"), token: str = Field("", description="用户token,默认从环境变量获取"), template: str = Field("", description="消息内容格式: `html`(默认)/`txt`/`markdown`"), channel: str = Field("", description="发送渠道: `wechat`(默认)/`webhook`/`mail`"), ):
- mcp_notify/other.py:190-193 (registration)The @mcp.tool decorator registers the pushplus_send_msg function as an MCP tool with title and description.@mcp.tool( title="PushPlus推送消息", description="通过PushPlus(推送加)推送消息", )
- mcp_notify/__init__.py:21-21 (registration)Invokes add_tools from the other module to register the tool with the FastMCP instance.other.add_tools(mcp)