mp_create_tietu
Create WeChat Official Account image messages by uploading local images, adding a title and description, then saving as a draft or publishing/scheduling with confirmation.
Instructions
Create a 贴图 (image message) in the WeChat Official Account console: upload one or more local PNG/JPEG images, write the title and the description, save it as a DRAFT, and optionally publish or schedule it in the same call. action=draft (default) stops at the draft; action=publish submits it immediately; action=schedule submits it for now+schedule_minutes. Publishing is irreversible and publicly visible, so it needs confirm=true, and the console then shows a 扫码 page the human must scan with WeChat before the message goes out. verified=true only once a new entry appears in 发表记录. Limits, enforced before the browser is touched: • images is required, 1-20 files, each a local gif/jpeg/jpg/png/webp file given as an absolute path that exists, at most 10 MB each (raise WXMP_MAX_IMAGE_BYTES to allow bigger files); the first one becomes the cover. • title is required, 1-64 characters; empty or longer is rejected with -32602. • description is clipped to 1000 characters and the reply reports desc_clipped=true; the console's own counter is returned as desc_counter and is not a 1:1 character count. • action=publish or action=schedule needs confirm=true. • schedule_minutes is 1-10080, but the time picker only offers today, so a large value cannot be honoured — keep it within the same day. Reply fields: appmsgid, state, verified (a NEW msgid in 发表记录), warning.
【中文】在公众号后台创建一条贴图:上传 1–20 张本地 PNG/JPEG 图片、写入标题和描述、存成草稿,并可在同一次调用里直接发布或定时发布。action=draft(默认)停在草稿;action=publish 立即提交;action=schedule 提交到 schedule_minutes 分钟之后。发布不可撤销且公开可见,需要 confirm=true;随后控制台会出现扫码页,必须由管理员用微信扫过,内容才会发出去。只有发表记录里出现新条目,verified 才会是 true。硬性要求(在碰浏览器之前就校验):• images 必填,1–20 个文件,每个都要是本地 gif/jpeg/jpg/png/webp 文件,必须写绝对路径且文件存在,单张最多 10 MB(要更大就调 WXMP_MAX_IMAGE_BYTES);第一张作封面。• title 必填,1–64 个字符;空或超长返回 -32602。• description 超过 1000 字截断,回包给 desc_clipped=true;控制台自己的计数以 desc_counter 返回,它和字数不是 1:1。• action=publish 或 action=schedule 需要 confirm=true。• schedule_minutes 范围 1–10080,但时间选择器只提供今天,所以太大的值无法兑现——请控制在同一天内。回包字段:appmsgid、state、verified(发表记录里出现新 msgid)、warning。
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"images": "<images>",
"title": "<title>"
},
"name": "mp_create_tietu"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| title | Yes | required, 1-64 characters as the console counts them; empty or longer is rejected with -32602 / 必填,1–64 个字符(后台计数口径);空或超长返回 -32602 | |
| action | No | draft keeps it in 草稿箱; publish submits it now; schedule turns on 定时发表 and submits for now+schedule_minutes. publish and schedule need confirm=true and a human: 发表 shows a 扫码 page that the admin must scan with WeChat. / draft 留在草稿箱;publish 立即提交;schedule 打开定时发表,提交到 schedule_minutes 分钟之后。publish 和 schedule 需要 confirm=true,而且需要人:发表时会出现扫码页,必须由管理员用微信扫。 | draft |
| images | Yes | required, 1-20 pictures: each must be a local gif/jpeg/jpg/png/webp file given as an absolute path that exists, at most 10 MB each (raise WXMP_MAX_IMAGE_BYTES to allow bigger files); the first one becomes the cover / 必填,1–20 张:每张都要是本地 gif/jpeg/jpg/png/webp 文件,必须写绝对路径且文件存在,单张最多 10 MB(要更大就调 WXMP_MAX_IMAGE_BYTES);第一张作封面 | |
| confirm | No | must be true for action=publish or action=schedule / action=publish 或 action=schedule 时必须为 true | |
| screenshot | No | save a full-page PNG of the composer / 把编辑器的整页 PNG 存下来 | |
| description | No | newlines become paragraphs. No maxLength: the code clips instead of refusing, so text longer than 1000 characters is trimmed and the reply reports desc_clipped=true / 换行会分成段落。不设 maxLength:行为是截断而不是拒绝,超过 1000 字会被裁掉,回包给 desc_clipped=true | |
| wait_publish_s | No | how long to poll 发表记录 for the new msgid before answering; 0 skips the poll and returns verified=false / 回答之前轮询发表记录等新 msgid 的秒数;0 表示不轮询,直接返回 verified=false | |
| schedule_minutes | No | minutes from now for action=schedule; the time picker only offers today, so keep it small / action=schedule 时表示从现在起多少分钟;控制台的时间选择器只提供「今天」,别设太大 |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||