Skip to main content
Glama

learn_document

Process documents in 25+ formats with semantic chunking and add them to a knowledge base for AI retrieval.

Instructions

使用高级非结构化处理技术(包含真正的语义分块)读取和处理文档文件,并将其添加到知识库。 当您想通过智能处理文档文件来训练人工智能时,可以使用此功能。

支持的文件类型:PDF、DOCX、PPTX、XLSX、TXT、HTML、CSV、JSON、XML、ODT、ODP、ODS、RTF、 图像(PNG、JPG、TIFF、带 OCR 的 BMP)、电子邮件(EML、MSG)以及超过 25 种格式。

高级功能:

  • 基于文档结构(标题、章节、列表)的 REAL 语义分块

  • 智能文档结构保存(标题、列表、表格)

  • 自动去噪(页眉、页脚、无关内容)

  • 结构化元数据提取

  • 适用于任何文档类型的强大回退系统

  • 通过语义边界增强上下文保存

使用示例:

  • 处理布局复杂的研究论文或文章

  • 从包含表格和列表的报告或手册中添加内容

  • 从带格式的电子表格导入数据

  • 将演示文稿转换为可搜索的知识

  • 使用 OCR 处理扫描文档

文档将通过 REAL 语义分块进行智能处理,并与增强的元数据一起存储。

将保存处理后文档的副本以供验证。

参数: file_path:要处理的文档文件的绝对路径或相对路径。

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
file_pathYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior4/5

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

Describes advanced processing steps: REAL semantic chunking, structure preservation, denoising, metadata extraction, fallback system, and saving a copy for verification. No annotations, so description carries full burden; it discloses key behaviors without contradicting any annotations.

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?

Description is somewhat long but well-structured with bullet points for supported types, features, and examples. Front-loaded with purpose; each section adds value without redundancy.

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?

Covers input, processing behavior, and outcome (stored in knowledge base with metadata, copy saved). Output schema exists, so return values not needed. Could mention idempotency but overall complete.

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

Parameters4/5

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

Single parameter file_path is explained as 'absolute or relative path' in the description, adding meaning beyond the schema's type string. Schema coverage is 0%, so description compensates well.

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?

Clearly states the tool reads and processes document files using advanced semantic chunking and adds to knowledge base. Distinguishes from sibling learn_text by specifying document file types and advanced features.

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?

Provides context on when to use (train AI on document files) and lists specific use cases. Does not explicitly exclude alternatives, but implied by focus on structured documents.

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/kalicyh/mcp-rag'

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