Skip to main content
Glama
ekelly95

document-index-mcp

by ekelly95

Ingest Document

ingest_document

Indexes a document from the library into the retrieval index, supporting PDF, DOCX, Markdown, and plain text. Returns a document ID while indexing continues in the background.

Instructions

Index a file from the library into the retrieval index. PDF, DOCX, Markdown and plain text are ingestible in this build; EPUB, PowerPoint, HTML and legacy binary Office (.doc) are recognised and refused with a reason naming the remedy. Scanned PDFs are detected and OCR'd automatically — expect those to index slowly, a few seconds per page. Format is decided by content rather than extension, which is why a mislabelled file is still routed correctly. Returns immediately with a document_id while indexing continues in the background — poll get_document_outline with that id to watch chunk_count rise and see when status becomes 'ready'. Re-ingesting an identical file is a no-op and returns the existing document_id.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathYesPath relative to the library root
titleNoOverrides the title detected from the file

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
titleYes
formatYes
reusedYes
statusYes
warningYesSet when known content was skipped; the index is incomplete
document_idYes
locator_countYes
Behavior5/5

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

With no annotations, the description carries full responsibility and excels. It discloses asynchronous indexing, immediate return of document_id, background processing, OCR for scanned PDFs, content-based format detection, and idempotent re-ingestion—far exceeding basic safety/behavioral expectations.

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 a single, well-structured paragraph where every sentence adds substantive value. It front-loads the core purpose, then logically covers formats, OCR, format detection, async behavior, and re-ingestion—no filler or redundancy.

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

Completeness5/5

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

Given the tool's complexity (async indexing, OCR, format nuances) and absence of annotations, the description is remarkably complete. It even explains how to verify completion via get_document_outline, making it self-sufficient for an agent. The output schema covers return structure, so no further detail is needed.

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?

The input schema already provides 100% coverage with descriptions for both parameters ('Path relative to the library root' and 'Overrides the title detected from the file'). The tool description adds no additional parameter-level insight, so the baseline of 3 applies.

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 'Index a file from the library into the retrieval index,' clearly stating the verb and resource. It distinguishes this from siblings like search_document and delete_document by focusing exclusively on ingestion.

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 provides clear context for use, including supported formats, refusal behavior, OCR handling, and re-ingest semantics. It does not explicitly contrast with alternatives, but the sibling tools are obviously different operations, so the guidance is adequate without formal exclusions.

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/ekelly95/document-index-mcp'

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