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
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
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | Document ID or slug (required) | |
| book_id | No | Repository ID or namespace (recommended when using slug) | |
| raw_body | No | Use raw body field instead of converting body_html to markdown (default false). Useful for markdown-format docs. | |
| output_dir | Yes | Output directory path (required). The file will be saved as <output_dir>/<title>.md |