Skip to main content
Glama
code-lawyer

rag-retriever-mcp

by code-lawyer

index_path

Index documents from a file or folder by extracting text, chunking, embedding, and storing vectors for retrieval. Returns a summary of indexed and skipped files.

Instructions

Index a file or a whole folder of documents (pdf, docx, pptx, xlsx, html, md, txt...). Extracts text, chunks it, embeds it, and stores vectors for later search. Returns a summary of how many files/chunks were indexed and what was skipped.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathYes
recursiveNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior2/5

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

No annotations are provided, so the description must fully disclose behavioral traits. It describes the indexing process and return value, but does not mention that this is a write operation that may be resource-intensive, require authentication, or have potential side effects like modifying the vector store. The description is incomplete for behavioral transparency.

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 three sentences, front-loaded with the action and supported types, followed by the process and return summary. Every sentence is informative and there is no extraneous content.

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?

An output schema exists, and the description adequately explains the return value (summary of indexed/skipped counts). However, it lacks details on error handling, permission requirements, or performance implications for large directories. Given the tool's simplicity and the presence of output schema, the description is reasonably complete but could be enhanced.

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

Parameters2/5

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

The description has 0% schema coverage, meaning it does not explicitly name or explain the parameters 'path' or 'recursive'. It vaguely implies path via 'file or folder', but does not clarify the default recursive behavior or how to control it. The description adds minimal semantic value beyond the schema.

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 verb 'Index' and the resource 'a file or a whole folder of documents'. It lists supported file types (pdf, docx, etc.) and explains the process (extracts text, chunks, embeds, stores vectors). This effectively distinguishes it from sibling tools like 'search' (which queries indexed data) and 'list_sources' (which lists sources).

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies that this tool is used to add documents to the index before searching, but it does not explicitly state when to use it versus alternatives, nor does it mention prerequisites or limitations. No guidance is given on when not to use it.

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/code-lawyer/rag-retriever'

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