Skip to main content
Glama

rechunk_document

Retrieves a PDF from MinIO, re-extracts text, splits into new chunks, generates fresh embeddings, and removes old chunks and embeddings.

Instructions

重新分块文档

从 MinIO 获取 PDF,重新提取文本并分块,然后生成新的 embeddings。 会删除旧的 chunks 和 embeddings。

Args: doc_id: 文档的唯一标识符 strategy: 分块策略,目前支持 "page_v1"(按页分块) force: 是否强制执行(即使已有 chunks),默认 False

Returns: 处理结果,包含新的 chunk 数量

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
doc_idYes
strategyNopage_v1
forceNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Behavior5/5

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

The description transparently discloses all key behaviors: fetching from MinIO, re-extracting text, re-chunking, regenerating embeddings, and deleting old chunks and embeddings. This is especially important given no annotations were provided. The 'force' parameter behavior is also explained.

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 extremely concise: two sentences of high-level overview followed by a structured Args/Returns section. Every sentence provides necessary information without redundancy, making it efficient and easy to parse.

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?

Given the tool's complexity (side effects, external storage, multi-step process) and the presence of an output schema, the description covers the main aspects: process, parameters, and return value. It could mention prerequisites (e.g., document must exist in MinIO) or error handling, but overall it is sufficiently complete for an agent to invoke correctly.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Despite the input schema having 0% description coverage, the description adds detailed meaning for all three parameters: 'doc_id' (unique identifier), 'strategy' (currently only 'page_v1'), and 'force' (conditional execution, default False). This fully compensates for the schema's lack of descriptions.

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 clearly states the tool's action: re-chunking a PDF document by extracting text, applying a chunking strategy, generating new embeddings, and deleting old chunks and embeddings. The verb 'rechunk' and resource 'document' are specific, and the tool is distinguished from siblings like 'reembed_document' which likely only re-embeds without re-chunking.

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 explains the tool's workflow and the 'force' parameter, indicating when to re-chunk even if chunks exist. However, it does not explicitly list alternatives or say when not to use it. The context is clear enough for an agent to understand the tool's role among sibling tools.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/h-lu/paperlib-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server