yuque_import_file
Imports a local Markdown or HTML file into Yuque, placing it in a specified repository and directory path. Supports direct content, uploaded assets, or embedded assets.
Instructions
Import a local Markdown/HTML file into Yuque. 3 modes: direct / upload_assets / embed_assets. 详见 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": {
"file_path": "<file_path>",
"book_id": "<book_id>",
"paths": "<paths>"
},
"name": "yuque_import_file"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| mode | No | Import mode: direct / upload_assets / embed_assets (default: direct) | |
| slug | No | Document slug, auto-generated if omitted | |
| paths | Yes | Directory paths, e.g. ["导入/技术文档"]. 1-5 paths (required) | |
| title | No | Document title, defaults to filename without extension | |
| format | No | Content format: markdown / lake / html, defaults to markdown | |
| book_id | Yes | Target repository ID or namespace (required) | |
| file_path | Yes | Local file path (required, .md or .html) |