Skip to main content
Glama

add_document

Import local PDF, DOCX, MD, TXT, or Office files to split and ingest them into shared knowledge, returning chunk counts and flagging missing or unsupported files.

Instructions

导入本地文档(PDF/DOCX/MD/TXT 及 Office 格式)切分入库; 返回 {"source": 文件名, "chunks": 块数};文件不存在或格式不支持时 返回 {"error": "FILE_NOT_FOUND" | "UNSUPPORTED_FORMAT", "message": 原因}。 project/client:仅用于审计归类;文档 chunk 为共享知识,所有客户端可检索。 client:来源客户端(可选,缺省从 clientInfo 自动识别)。 English: Import a local document (PDF/DOCX/MD/TXT and Office formats), split and ingest it; returns {"source": filename, "chunks": count}; when the file is missing or the format is unsupported returns {"error": "FILE_NOT_FOUND" | "UNSUPPORTED_FORMAT", "message": reason}. project/client: audit bucketing only; document chunks are shared knowledge, searchable by all clients.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathYes
clientNo
projectNo
Install Server

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 the full burden and largely meets it: it discloses the split-and-ingest side effect, the two error modes with exact error codes, and the shared-knowledge behavior. It does not mention permissions or idempotency, but it is still substantially transparent.

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?

The description is front-loaded with the verb, formats, and return contract, and the bilingual duplication is structured rather than rambling. It is longer than necessary because of the translation, but every section carries useful information.

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 there is no output schema, the description supplies the return shape and error contract. Given there are no annotations, it also discloses the shared-knowledge side effect. A small gap remains around path qualification and prerequisites, but the agent has enough context to call the tool and interpret results.

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 0%, and the description does add useful meaning for project/client: audit bucketing only and optional client auto-detection from clientInfo. However, the required path parameter is never explicitly described, and its format is only implied by 'local document' and FILE_NOT_FOUND.

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 opens with a specific action: import and ingest a local document. It names supported formats, states the exact return shape, and contrasts naturally with the sibling add_webpage by requiring a local path.

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 tells the agent this is for local files, that project/client are audit-only, and that ingested chunks become shared knowledge searchable by all clients. It does not explicitly name alternatives or state when not to use it, but the local-file requirement and the presence of add_webpage imply the boundary.

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

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/fish827-08/rag-kb'

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