Skip to main content
Glama
ribhav-jain

docsonar

by ribhav-jain

find_similar

Find documents with similar meaning to a given file by comparing stored embeddings. Use to discover related notes, duplicate content, or same-topic files.

Instructions

Find indexed documents most similar in meaning to a given file.

Use for "more like this" — e.g. finding related notes, duplicate content, or other documents on the same topic. path must be a file inside a registered folder that has already been indexed. Similarity uses stored embeddings (whole-file centroid vs. best-matching chunks), so it works even if the embedding model is not currently loaded.

Returns {ok, source, similar: [{path, file_type, score, preview}, ...]}. score is cosine similarity (0-1, higher is more similar); preview is the best-matching section's heading or opening text. Returns an error if the file has no stored embeddings.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathYes
top_kNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Behavior5/5

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

With no annotations provided, the description fully bears the burden of behavioral disclosure. It explains that similarity uses stored embeddings (whole-file centroid vs. best-matching chunks), works even if the model is not loaded, returns cosine similarity scores and previews, and errors if the file has no stored embeddings. This is rich, honest transparency about inner workings and edge cases.

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 well-organized into a brief overview, usage hint, technical mechanism, and return format, all within a few sentences. No fluff—each sentence adds value, from the purpose to the error condition. It is front-loaded with the most important information.

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?

Given the moderate complexity and presence of an output schema, the description does a strong job: it explains the return format, score meaning, preview semantics, and error conditions. It only misses the 'top_k' parameter explanation and could optionally mention that the result list is ordered by score. Overall, it is nearly complete but missing one key param detail.

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?

The schema has 2 parameters with 0% description coverage, so the description must compensate. It adequately explains the required 'path' parameter ('must be a file inside a registered folder that has already been indexed'). However, the optional 'top_k' parameter is not mentioned at all, leaving the agent to guess its meaning. The description covers only half the parameters, earning a 3.

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 opens with a specific verb+resource: 'Find indexed documents most similar in meaning to a given file.' It further clarifies the use case with examples like 'related notes, duplicate content' and explicitly distinguishes from sibling tools such as search by framing it as 'more like this.' This is a clear, purpose-focused definition.

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?

The description provides explicit usage context: 'Use for "more like this"' and lists concrete examples. It also states a prerequisite ('path must be a file inside a registered folder that has already been indexed'). However, it does not explicitly state when not to use it or mention alternatives like search for keyword queries, so it falls just short of a 5.

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/ribhav-jain/docsonar'

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