Skip to main content
Glama
didou92i

lmstudio-local

by didou92i

lm_rag_search

Search local document collections for relevant source excerpts using cosine similarity, excluding changed or missing files and rejecting incompatible embeddings.

Instructions

Retrieve source excerpts using cosine similarity. Excludes changed/missing documents and rejects incompatible embeddings.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
queryYes
top_kNo
min_scoreNo
collectionYes
embedding_modelYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv2.1.0

TDQS

B3.2/5.0
Behavior4/5

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

With annotations present, the description adds real behavioral context the annotations do not carry: results exclude changed or missing documents and the call rejects incompatible embeddings, which tells the agent about staleness filtering and a failure mode. It does not, however, explain the index/freshness prerequisite or why readOnlyHint is false for what looks like a read operation.

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 short sentences, front-loaded with the core action, with no filler. Both statements carry information the structured fields do not.

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

Completeness2/5

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

For a 5-parameter tool with no schema descriptions and no output schema, the definition is thin: it never describes the returned excerpts or their shape, how top_k and min_score tune results, or what 'incompatible embeddings' means operationally. The behavioral filter notes are helpful but leave the invocation contract underspecified.

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?

Schema description coverage is 0% across five parameters, so the description carries the full burden, yet it never explains query, collection, embedding_model, top_k, or min_score semantics. 'Cosine similarity' and 'incompatible embeddings' loosely imply that embedding_model must match the indexed model and that min_score is a similarity threshold, but this is inference rather than documentation.

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 and resource ('Retrieve source excerpts') and adds the retrieval mechanism ('cosine similarity'), so the agent knows this is a semantic retrieval tool. It does not explicitly differentiate itself from the closest sibling, lm_rag_ask, which likely does answer synthesis over the same corpus.

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

Usage Guidelines2/5

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

There is no when-to-use guidance and no mention of alternatives, even though lm_rag_ask and lm_rag_index sit in the same family and are the obvious confusion points. Usage is only implied by the word 'Retrieve'.

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