Skip to main content
Glama

stagenth · 文档解析

doc_chunk

把文档切成适合 RAG / 向量嵌入的语义块(按标题层级切,超长块按段落细分)。

    返回 [{index, heading, text, chars}],喂检索/嵌入无需再自己写切块逻辑。
    

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
file_idNo已上传到文件中转站的文档 ID(与 data_base64 二选一)
filenameNo文件名带扩展名;base64 输入时必填以判类型
max_charsNo每块最大字符数(200-8000)
page_rangeNo页码范围,如 3-10,空=全部(PDF/PPT 有效)
data_base64No文档内容 base64(与 file_id 二选一)

TDQS

A4/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. It discloses the chunking algorithm (by heading hierarchy, subdividing long chunks by paragraphs) and the return format. However, it does not mention side effects, non-destructive nature, input constraints, or error behavior, leaving gaps in behavioral disclosure.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is two sentences, front-loaded with purpose and method, followed by return format and benefit. Every sentence earns its place with no unnecessary words.

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 simple chunking tool, the description is fairly complete: it covers purpose, behavior, and output format. Schema descriptions cover all parameters. Minor gaps remain around edge cases (e.g., both file_id and data_base64 null, file type limitations) and alternative usage, but overall it is sufficient given the schema richness.

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% for all 5 parameters, so the baseline is 3. The description adds minimal parameter-related context (e.g., chunking rules relate to max_chars), but mostly relies on the schema's parameter descriptions. No additional parameter semantics are needed.

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?

The description uses a specific verb '切成' (cut into) with the resource '文档' (documents), and clearly states the scope: creating semantic chunks for RAG/vector embeddings. It distinguishes from sibling tools (doc_images, doc_parse, doc_tables) by focusing on chunking rather than images, parsing, or tables.

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?

The description explicitly mentions when to use it ('喂检索/嵌入' – for retrieval/embedding) and highlights the benefit of not writing custom chunking logic. It does not explicitly list exclusions or compare with alternatives, but the context is clear enough for RAG/embedding workflows.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

TDQS

A4.4/5.0
Disambiguation5/5

Each tool targets a distinct aspect of document processing: parsing to Markdown, extracting images, extracting tables, and chunking for RAG. The descriptions clearly differentiate their purposes, and doc_tables explicitly notes its difference from doc_parse.

Naming Consistency5/5

All tools follow the consistent pattern 'doc_' + a noun (chunk, images, parse, tables). Naming is uniform, lowercase, and underscore-separated, making the tool surface predictable.

Tool Count5/5

Four tools is a well-scoped number for a document parsing server, covering core parsing, image extraction, table extraction, and chunking without unnecessary redundancy.

Completeness5/5

The tool surface covers the full document processing pipeline: parse to Markdown, extract structured tables, extract images, and produce RAG-ready chunks. The only noted limitation (OCR) is explicitly disclosed and does not undermine the core workflows.

Resources