Skip to main content
Glama

index_document

Add UTF-8 text to the RAG index. kind=file stores a named text file and checks ACL file_upload (former file_upload). kind=note stores a short note titled title or note.txt and checks ACL rag_note (former rag_note). Both preflight rag_index capacity, then meter 1 kvp_ops for the upload. Chunk indexing spends rag_index later on the queue. Returns file, an estimated chunk count, budget, and keyBudget. PDF and Excel binaries belong on REST multipart POST /api/files/:namespace. Use search_documents to query and list_files to list what was uploaded. No email.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
kindYesfile checks ACL file_upload and requires filename. note checks ACL rag_note and uses title as the filename. Required. No default.
textNoUTF-8 document body. Required for file and note.
titleNoFilename for kind=note, up to 180 characters. Default note.txt. Ignored for kind=file.
filenameNoFile name including extension. Required for kind=file. Ignored for kind=note (use title).
namespaceNoNamespace that will own the file. Required for file and note. Must be in the key namespace allow-list when that list is set.
contentTypeNoMIME type for kind=file. Default text/plain. Ignored for kind=note, which is stored as text/plain.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4/5.0
Behavior4/5

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

With no annotations, the description carries the behavioral burden well: it discloses capacity preflight, metering (1 kvp_ops), ACL checks, and return fields. It doesn't mention rate limits, idempotency, or failure modes, but covers core behavior.

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 dense and front-loaded with the core action, then mode-specific details and cross-references. It's appropriately sized, though slightly crowded with parenthetical former ACL names.

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 no output schema and no annotations, the description is complete: it covers both modes, ACL requirements, metering, return values, and points to related tools. An agent has enough to invoke correctly.

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 coverage is 100%, so parameters are fully documented in the schema. The description adds some context about 'kind' defaults and 'title' behavior, but largely repeats what the schema already provides. Baseline 3 is appropriate.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description states a specific verb+resource: 'Add UTF-8 text to the RAG index.' It clearly distinguishes the two modes (file vs note) and their ACL checks, but doesn't fully separate itself from all siblings beyond naming search_documents and list_files.

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?

It explicitly states when to use each kind, points to search_documents for querying and list_files for listing, and directs PDF/Excel binaries to the REST endpoint. However, it doesn't provide when-not-to-use guidance for text uploads or alternative indexing tools.

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.