Skip to main content
Glama

yuque_upload_attachment

Uploads local images, attachments, or videos to Yuque CDN and rejects unsupported file formats with guidance to package them as zip.

Instructions

Upload a file to Yuque CDN (image≤50MB, attachment/video≤2GB, requires cookie+ctoken). Extension pre-check: only Yuque-supported formats allowed (official list: https://www.yuque.com/yuque/gpvawt/ca13hg), unsupported extensions rejected with a friendly error (pack into zip first). POST /upload/attach. 详见 references/api/upload_api.md

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": {
      "file_path": "<file_path>"
    },
    "name": "yuque_upload_attachment"
  }
}

Input Schema

NameRequiredDescriptionDefault
typeNoFile type: image, attachment, video, default attachment
user_idNoUser ID, auto-detected from token if omitted
file_pathYesLocal file path (required)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.9/5.0
Behavior4/5

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

With no annotations, the description carries the full burden and does well: it discloses size limits per file type (image ≤50MB, attachment/video ≤2GB), the auth requirement (cookie+ctoken), and the pre-flight extension validation with its rejection behavior. It never says what is returned (URL/attachment reference) or whether uploads are idempotent, which keeps it from a 5.

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

Conciseness3/5

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

Front-loaded with the size limits, which is the right priority, but the sentence is dense with mixed-language trailing material ('详见 references/api/upload_api.md') and an internal endpoint path that adds little for an agent. The external official-list URL is useful context but makes the line longer than it needs to be.

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?

For a 3-parameter upload tool, this is highly complete: limits, auth, validation behavior, and the failure remediation are all covered, and there is no output schema that would need explaining. The only residual gap, the return value, is minor and arguably covered by the referenced API doc.

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

Parameters3/5

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

Schema description coverage is 100%, so the schema already documents file_path, type, and user_id. The description contributes the per-type size limits that map onto the `type` enum values, but adds no further semantics for file_path format or user_id resolution beyond what the schema states. Baseline 3 is appropriate.

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?

States a specific verb and resource ('Upload a file to Yuque CDN') plus the concrete endpoint (POST /upload/attach). No sibling tool in the catalog overlaps with CDN attachment upload, so an agent can immediately tell this apart from the doc/repo CRUD tools.

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

Usage Guidelines3/5

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

Usage is only implied: the size caps and the 'pack into zip first' fallback tell the agent what is accepted, but there is no explicit statement of when to choose this tool over alternatives (e.g., embed_url or export_resources) or of any prerequisite ordering. The extension policy is the only real decision guidance.

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