Skip to main content
Glama
aliyun

AlibabaCloud DevOps MCP Server

Official
by aliyun

create_workitem_attachment

Upload a file attachment (up to 10MB) to a work item via base64 content or local file path, then retrieve download or embeddable URLs for use in descriptions.

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
Install Server

TDQS

A4.9/5.0
Behavior5/5

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

No annotations are provided, so the description carries the full burden. It discloses behavioral details such as the temporary nature of the returned URL (30s expiry), the permanent nature of embedUrl, the security risk of filePath, file type exclusions (svg/tiff), and size limits. This is very transparent and goes beyond basic expectations.

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

Conciseness4/5

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

The description is long but well-structured with bullet points and clear sections. Every sentence provides necessary detail, though it could be slightly more concise in places (e.g., the operatorId wording is a bit confusing). The front-loaded purpose and organized format earn it a high score, though not perfect due to minor verbosity.

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?

There is no output schema, so the description must explain return values. It does so thoroughly, listing key fields (id, name, size, suffix, url, embedUrl, embedMarkdown, embedHtml) and their meanings and use cases. It also provides integration guidance with update_work_item, making the tool self-contained and complete.

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

Parameters5/5

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

Schema coverage is 100%, but the description adds significant meaning beyond the schema: it explains the conditional relationship between fileContent, fileName, and filePath, when each is required, base64 size overhead, basename default, and the disabled state of filePath in remote deployments. This greatly enhances parameter understanding.

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 uploads a file as an attachment to a work item via multipart/form-data, with a specific verb and resource. It also specifies file type and size constraints, distinguishing it from sibling tools like list_workitem_attachments and 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 explicitly differentiates when to use fileContent vs filePath based on deployment mode (remote vs local), warns against using filePath in remote deployments, and provides a standard three-step method for embedding images in work item descriptions. It also clarifies operatorId requirements for different token types.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

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