Skip to main content
Glama

locus_related_docs

Finds documents similar to a reference document using TF-IDF cosine similarity, supporting 'find more like this' workflows and knowledge base navigation.

Instructions

Find documents most similar to a given document using TF-IDF cosine similarity. No embeddings — built entirely on the existing term index. Useful for 'find more like this' workflows and knowledge base navigation.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "doc_path": "<doc_path>"
    },
    "name": "locus_related_docs"
  }
}

Input Schema

NameRequiredDescriptionDefault
limitNo
doc_pathYesPath of the reference document.
store_pathNo.locus

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.3.1

TDQS

B3.4/5.0
Behavior4/5

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

With no annotations supplied, the description carries the full burden and does disclose a behavior-shaping trait: retrieval is lexical (TF-IDF over the existing term index, 'No embeddings'), so semantically similar documents with different wording may be missed, and no additional index build is needed. It does not explicitly state that the operation is read-only or side-effect free, which is a minor remaining gap.

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?

Three tight sentences with the core operation front-loaded, then the mechanism, then use cases. Nothing is redundant, though the sentence fragment 'No embeddings — built entirely on the existing term index' could be folded into the mechanism statement.

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 simple read-style retrieval tool with 3 parameters, the description covers the what and the how, but leaves open what is returned (document paths? scores?) and how limit/store_path affect results. With no output schema and no annotations, those omissions leave real gaps for an agent deciding whether to call it.

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 only 33%: doc_path is documented in the schema, but limit and store_path have no descriptions, only defaults. The description mentions no parameters at all, so it does not compensate for the undocumented limit (result count) or store_path (which index to search).

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 and resource ('Find documents most similar to a given document') plus the mechanism (TF-IDF cosine similarity). It does not differentiate itself by name from sibling retrieval tools like locus_multi_retrieve or locus_retrieve, but the 'similar to a given document' framing is distinctive enough to be actionable.

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?

Names two usage contexts ('find more like this' workflows, knowledge base navigation), which implies when to reach for it. It gives no exclusions or alternatives, so an agent must infer on its own when a keyword or embedding-based retrieval tool would be the better choice.

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