Skip to main content
Glama

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

NameRequiredDescriptionDefault
modeNoImport mode: direct / upload_assets / embed_assets (default: direct)
slugNoDocument slug, auto-generated if omitted
pathsYesDirectory paths, e.g. ["导入/技术文档"]. 1-5 paths (required)
titleNoDocument title, defaults to filename without extension
formatNoContent format: markdown / lake / html, defaults to markdown
book_idYesTarget repository ID or namespace (required)
file_pathYesLocal file path (required, .md or .html)

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv4.0.0
    • changedInput schema / properties / format / description
      Previous value: -"Content format: markdown / html, defaults to markdown"New value: +"Content format: markdown / lake / html, defaults to markdown"
  2. First observedv0.1.0

TDQS

C2.8/5.0
Behavior2/5

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

No annotations are provided, so the description carries the full burden of describing behavior, and it does not do so. It does not say whether the tool creates a new document, how it handles a name conflict with an existing slug, whether 'upload_assets' stores images externally, whether 'embed_assets' inlines them, or whether a write to a repository requires write permissions. The three mode names hint at divergent behavior without explaining any of it.

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?

The sentence that names the operation comes first, which is good, but the second sentence just lists mode names without saying how they differ, and the closing line delegates to an external file reference and is in Chinese, which most callers cannot use at decision time. It is short, but the part after the first sentence does not advance the caller's understanding.

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

Completeness2/5

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

This is a 7-parameter, file-writing mutation tool with no annotations and no output schema, so the description should explain conflict handling, asset behavior, and success indications. It instead defers the substance to references/api/extended_api.md, which an agent may not be able to read, leaving the behavior of the most consequential parameter (mode) unexplained.

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 defines every parameter (mode, paths, slug, title, format, book_id, file_path) including defaults. The description adds nothing beyond repeating one fact the schema already documents, the three mode names, so the baseline score of 3 applies.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The definition names a specific verb (Import) and a specific resource (a local Markdown/HTML file) and names the destination (Yuque), which is enough to distinguish it from yuque_import_url at a glance. The only weakness is that 'import' does not make clear whether it creates a new document or merges into an existing one.

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

Usage Guidelines2/5

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

Nothing states when to use this rather than yuque_import_url or yuque_create_doc. It mentions that 3 modes exist, and lists their names, but says nothing about how to choose among them, nor about any prerequisite for choosing one.

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