create_workitem_attachment
Attach local files to work items by specifying file path, organization, and work item ID. Supports files up to 10MB, excluding SVG/TIFF.
Instructions
[Project Management] Upload a local file as an attachment to a work item via multipart/form-data. MCP Server reads the file at the given absolute path and uploads it. Supports any file type (单文件 ≤ 10MB,云效不支持 svg/tiff)。 返回 WorkitemFile 含以下关键字段:
id/name/size/suffix:文件基础信息url:OSS 临时下载地址,约 30 秒过期。⚠️ 仅用于下载,不要嵌入工作项描述/评论embedUrl:永久代理 URL,适用于在工作项描述/评论中嵌入图片embedMarkdown:预拼好的 Markdown 图片标签,formatType=MARKDOWN 时拼接进 description 即可embedHtml:预拼好的 HTML 标签,formatType=RICHTEXT 时拼接进 description 即可 在工作项描述中插入图片的标准三步法:① 创建工作项(如已有则跳过);② 调本工具上传图片、读出 embedMarkdown / embedHtml;③ 调 update_work_item,在 updateWorkItemFields.description 中拼入该 embed* 字段,同时设置 updateWorkItemFields.formatType 为 "MARKDOWN" 或 "RICHTEXT"。 应用 token 场景必传 operatorId,个人 token 必传可省略。
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| organizationId | Yes | Organization ID, can be found in the basic information page of the organization admin console | |
| workItemId | Yes | 工作项唯一标识 | |
| filePath | Yes | 本地文件的绝对路径,MCP Server 将读取该文件并上传为工作项附件 | |
| operatorId | No | 操作者的userId,个人token时该参数无效 |