Skip to main content
Glama

yuque_export_doc

Export a single Yuque document as a Markdown file by converting its HTML content, adding frontmatter, and saving it to a specified directory.

Instructions

Export a single document as Markdown file. Fetches doc → converts body_html to Markdown → adds frontmatter → writes to disk. Resource download is separate (yuque_export_resources). 详见 references/api/extended_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": {
      "id": "<id>",
      "output_dir": "<output_dir>"
    },
    "name": "yuque_export_doc"
  }
}

Input Schema

NameRequiredDescriptionDefault
idYesDocument ID or slug (required). number 或字符串都接受
book_idNoRepository ID or namespace (recommended when using slug)
raw_bodyNoUse raw body field instead of converting body_html to markdown (default false). Useful for markdown-format docs.
output_dirYesOutput directory path (required). The file will be saved as <output_dir>/<title>.md

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changedv4.0.1
    • addedInput schema / properties / id / anyOf
      Added value: +[
      +  {
      +    "type": "string"
      +  },
      +  {
      +    "type": "number"
      +  }
      +]
    • changedInput schema / properties / id / description
      Previous value: -"Document ID or slug (required)"New value: +"Document ID or slug (required). number 或字符串都接受"
    • removedInput schema / properties / id / type
      Removed value: -"string"
  2. First observedv0.1.0

TDQS

A3.8/5.0
Behavior3/5

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

With no annotations provided, the description carries the full disclosure burden, and it does reveal the real behavior: fetch, convert body_html to Markdown, add frontmatter, then write to disk, making the filesystem side effect explicit. It omits what happens when the target file already exists, how failures are reported, or whether authentication/rate limits apply, which matters for a write-to-disk operation.

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 definition is front-loaded with the outcome, then the internal steps, then the sibling exclusion in three short sentences with no filler. The trailing reference pointer ("详见 references/api/extended_api.md") is a vague external pointer that adds little on its own.

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

Completeness3/5

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

For a four-parameter output-writing tool with no annotations and no output schema, the description covers the transformation pipeline and the destination path convention, but does not state what the tool returns (e.g., the written file path or a summary) or how it handles collisions and errors. That leaves meaningful gaps for a disk-mutating operation.

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 all four parameters are already documented in the schema; the description adds only indirect context via the body_html-to-Markdown conversion step, which explains the purpose of raw_body. It adds no extra meaning for id, book_id, or output_dir beyond what the schema states.

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 opens with a concrete verb and resource ("Export a single document as Markdown file") that distinguishes this tool from a plain content fetch, and it explicitly names yuque_export_resources as the separate resource-download path so an agent can tell the two exports apart without reading schemas.

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

Usage Guidelines4/5

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

It clarifies scope boundaries by stating that resource download is handled by yuque_export_resources, which gives a clear when-to-use split for the most confusable sibling. It stops short of saying when to prefer this over yuque_get_doc (read-only retrieval) or yuque_export_repo, so the guidance is clear but not exhaustive.

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