Skip to main content
Glama

search_similar

Find semantically similar documents by comparing embeddings. Input a reference document to retrieve related files with similarity scores.

Instructions

Find documents similar to a given document.

Uses the document's embedding to find semantically similar documents.

Args:
    filepath: Path to the reference document
    max_results: Number of similar documents to return (default: 5)

Returns:
    JSON string with list of similar documents and similarity scores

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
filepathYes
max_resultsNo

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 carries full burden. It mentions the mechanism (embedding-based similarity) and return format (JSON string with list and scores), but lacks details on permissions, rate limits, error handling, or what 'similar' entails (e.g., threshold). For a tool with no annotations, this is insufficient behavioral context.

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?

The description is well-structured with purpose, mechanism, args, and returns sections. It's front-loaded with the core function. However, the 'Args' and 'Returns' sections are somewhat redundant with the schema and output schema, slightly reducing efficiency. Overall, it's concise but not perfectly minimal.

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?

Given 2 parameters, 0% schema coverage, no annotations, but an output schema exists, the description is moderately complete. It explains parameters and return format, but lacks usage guidelines, behavioral details, and doesn't fully compensate for missing schema descriptions. The output schema reduces need for return value explanation, but gaps remain for a similarity search tool.

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 must compensate. It adds meaning by explaining 'filepath' as 'Path to the reference document' and 'max_results' as 'Number of similar documents to return (default: 5)', which clarifies beyond schema titles. However, it doesn't detail format constraints (e.g., filepath syntax) or value ranges, leaving gaps. Baseline 3 is appropriate as it adds some value but not fully.

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 clearly states the tool's purpose: 'Find documents similar to a given document' with the specific mechanism 'Uses the document's embedding to find semantically similar documents.' It distinguishes from siblings like 'search_knowledge' by focusing on similarity rather than general search. However, it doesn't explicitly contrast with all siblings like 'list_documents' or 'get_document', keeping it at 4 rather than 5.

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?

The description provides no guidance on when to use this tool versus alternatives like 'search_knowledge' or 'list_documents'. It mentions the mechanism (embedding-based similarity) but doesn't specify scenarios, prerequisites, or exclusions. Without explicit when/when-not instructions, it scores low.

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/lyonzin/knowledge-rag'

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