Skip to main content
Glama
didou92i

lmstudio-local

by didou92i

lm_rag_index

Index TXT/MD/PDF/DOCX files with local embeddings and source metadata for citation-checked search and answers. Use replace to rebuild the collection.

Instructions

Index selected TXT/MD/PDF/DOCX files with local embeddings and source/page/hash metadata. Roots set by LM_MCP_RAG_ROOTS. replace rebuilds collection.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathsYes
replaceNo
collectionYes
embedding_modelYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv2.1.0

TDQS

A3.7/5.0
Behavior4/5

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

Annotations only declare write/non-destructive profile. The description adds real operational context beyond that: roots limited by LM_MCP_RAG_ROOTS env var, metadata captured (source/page/hash), and that 'replace rebuilds collection'. That's meaningful behavioral disclosure for a mutation tool.

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?

Two tight sentences, front-loaded with what gets indexed and how, followed by the environment constraint and the flag behavior. No filler.

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

Completeness3/5

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

For a 4-param indexing tool with no output schema and zero schema coverage, the description should explain what 'collection' and 'embedding_model' mean and what happens on success/failure. It covers replace, roots, and metadata but leaves the two most consequential required params opaque.

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%, so the description carries the burden. It explains 'replace' semantics and partially clarifies 'paths' by listing file types, but 'collection' and 'embedding_model' — both required — get no explanation. Partial compensation only.

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?

States a specific verb ('Index') and resource (TXT/MD/PDF/DOCX files) with the storage mechanism (local embeddings) and metadata captured. Clear enough to distinguish from lm_rag_ask/lm_rag_search, though it doesn't explicitly name those siblings.

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 mention of 'replace rebuilds collection' gives condition-level guidance for that flag, and the roots constraint implies a precondition. But there's no explicit when-to-use versus lm_rag_search/lm_rag_ask, nor guidance on incrementally adding vs rebuilding.

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