Skip to main content
Glama

yuque_export_doc

Exports a single Yuque document as a Markdown file by retrieving its contents, converting the HTML body, adding front matter, and writing it to the requested output 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

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idYesDocument ID or slug (required)
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. 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, the description carries the full burden, and it does disclose the operational shape: it fetches, converts, adds frontmatter, and writes to local disk, plus that resources are not included. It is silent on consequential behavior such as overwriting an existing file, directory creation, authentication/permission requirements, and error conditions.

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?

Three short, front-loaded clauses with no filler; the pipeline and the boundary with the resources tool come first. The trailing '详见 references/api/extended_api.md' pointer is low-value for an agent that cannot necessarily open that file, but it costs little.

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 write-to-disk tool with no annotations and no output schema, the description explains the write target and conversion but omits what the call returns (path? metadata?), overwrite semantics, and permission prerequisites. Adequate but with clear gaps for an agent to call this safely.

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 documents all four parameters, including raw_body's role. The description marginally reinforces raw_body by describing the default body_html→Markdown conversion, but adds no syntax, format, or constraint detail beyond the schema. 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+resource (export a single document) and immediately enumerates the exact transformation pipeline (fetch doc → body_html to Markdown → frontmatter → write to disk), which no sibling does. It also distinguishes itself from yuque_export_resources and implicitly from yuque_export_repo by scoping to 'a single document.'

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?

Provides a clear division of labor by naming the sibling tool for the adjacent task ('Resource download is separate (yuque_export_resources)'), which helps an agent route correctly. It stops short of explicit when-to-use/when-not guidance, e.g. export-to-disk vs. reading via yuque_get_doc.

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