Skip to main content
Glama
aliyun

AlibabaCloud DevOps MCP Server

Official
by aliyun

create_workitem_attachment

Upload any file as an attachment to a work item in Alibaba Cloud DevOps, returning a temporary download URL and permanent embed URLs for images.

Instructions

[Project Management] Upload a file as an attachment to a work item via multipart/form-data. Supports any file type (单文件 ≤ 10MB,云效不支持 svg/tiff)。 文件来源二选一:

  • 远程(streamable HTTP)部署:传 fileContent(文件内容的 base64 编码)+ fileName(含扩展名)。此时 server 与调用方通常不同机,server 读不到调用方本地文件,必须走 base64 内联。

  • 同机 / stdio 本地运行:传 filePath(绝对路径),server 直接读该文件;fileName 可省略(默认取路径 basename)。⚠️ 远程部署下 filePath 已被禁用(指向服务器文件系统,存在任意文件读取风险),只能用 fileContent。 返回 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

TableJSON Schema
NameRequiredDescriptionDefault
fileNameNo文件名(含扩展名,如 design.png)。提供 fileContent 时必填;提供 filePath 时可省略,默认取路径的 basename
filePathNo本地文件的绝对路径,MCP Server 将读取该文件。仅适用于 server 与调用方同机的场景(如 stdio 本地运行)。⚠️ 远程(streamable HTTP)部署下本参数已被禁用(filePath 指向服务器文件系统,存在任意文件读取的安全风险),此时请改用 fileContent
operatorIdNo操作者的userId,个人token时该参数无效
workItemIdYes工作项唯一标识
fileContentNo文件内容的 base64 编码。远程部署上传附件时使用,需配合 fileName。单文件 ≤ 10MB(base64 编码后约 13.5MB)
organizationIdYesOrganization ID, can be found in the basic information page of the organization admin console
Behavior5/5

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

With no annotations, the description fully discloses behaviors: file size limit (≤10MB), unsupported types (svg/tiff), the security risk of using filePath (arbitrary file read), the 30-second expiry of the download URL, and correct usage of embed fields. It also specifies token context (operatorId required for app token, ignorable for personal token). No contradictions with annotations.

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

Conciseness5/5

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

The description is well-structured with clear sections (purpose, constraints, data source options, return fields, workflow, token notes). Although long, every sentence provides necessary context, and the main action is front-loaded. No unnecessary repetition.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given no annotations and no output schema, the description compensates by thoroughly explaining the return fields (url, embedUrl, embedMarkdown, embedHtml) and how to use them in the follow-up update_work_item call. It provides a complete workflow and covers all critical constraints, making it fully actionable for an agent.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema already has 100% parameter description coverage. The description adds value beyond the schema by explaining the conditional relationship between fileContent, fileName, and filePath (e.g., filePath requires same-machine and fileName defaulting to basename), and the security rationale for avoiding filePath in remote deployments. This goes beyond the per-parameter schema text.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's function: 'Upload a file as an attachment to a work item via multipart/form-data.' This specifies the verb (upload), resource (work item attachment), and method, distinguishing it from sibling tools like list_workitem_attachments or get_workitem_file.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides explicit when-to-use guidance, including deployment-specific parameter choices: '远程部署下 filePath 已被禁用...只能用 fileContent' and '同机 / stdio 本地运行:传 filePath'. It also outlines a three-step workflow for embedding images, clearly placing this tool as step 2, and mentions when to skip creation ('如已有则跳过').

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/aliyun/alibabacloud-devops-mcp-server'

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