Skip to main content
Glama
yangmi829
by yangmi829

从磁盘工作稿批量入库 / 更新

import_articles_from_dir

Batch import local chapter markdown files into a novel manuscript library, extracting chapter numbers and titles with preview and confirmation.

Instructions

把磁盘上的章节稿(小说/<书名>_<书号>/章节/第NN章_标题.md)批量同步进本地文稿库。章节号与标题优先取文内「# 第N章 标题」,文件名作回退;> **本章概要** 之类的元信息块与 markdown 标记会被剥掉。已存在(同小说 + 同章节号)默认覆盖正文但保留其状态/发布时间。纯本地、不触网。dir 省略时按 novel_id 推断工作稿目录。默认 confirm=false 只预览。

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
dirNo章节稿目录(可含子目录 章节/);省略则按 novel_id 推断
kindNo默认 chapter
statusNo新建条目的状态,默认 draft
confirmNo是否真正写入,默认 false(只预览)
novel_idNo归属的本地小说 id(用于匹配已存在章节与推断目录)
update_existingNo已存在章节是否覆盖正文,默认 true

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.1/5.0
Behavior4/5

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

With no annotations, the description carries full load and discloses substantial behavior: parse priority (in-file heading over filename), metadata/markdown stripping, and the overwrite rule (same novel+chapter overwrites body but preserves status/publish time), plus 'no network'. It leaves return/preview output format and malformed-file handling unstated, so not quite a 5.

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?

Front-loads the path pattern that anchors the whole operation, then layers parse rules, overwrite semantics, locality, and defaults in dense, non-redundant sentences. It is longer and information-dense but nothing is filler.

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

Completeness4/5

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

For a 6-param, no-annotation, no-output-schema batch tool, it covers the key behaviors an agent needs (what it touches, how it parses, what it preserves, that it's offline, preview default). Only the shape of the preview/result and edge-case errors are unaddressed.

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 documents all six parameters. The description reinforces a few (dir inference, confirm=preview, default overwrite) but adds no syntax or format detail beyond those structured descriptions; 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 (批量同步进本地文稿库) and a concrete resource (磁盘章节稿), including the exact glob-like path pattern `小说/<书名>_<书号>/章节/第NN章_标题.md`. This clearly separates it from single-item siblings like save_article/export_article, which an agent can distinguish without opening any schema.

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?

Gives clear operational context: dir can be omitted and is then inferred from novel_id, and confirm defaults to false so it only previews. It does not explicitly name an alternative (e.g. save_article for single in-body saves) or state when-not-to-use, so it stops short of a 5.

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