Skip to main content
Glama

search_similar

Retrieve similar text chunks by providing a source chunk ID. Returns ranked results with scores and snippets.

Instructions

Find chunks similar to a given chunk by ID.

Args: chunk_id: ID of the source chunk. k: Number of similar results to return (max 20).

Returns: List of similar chunks with scores and text snippets.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
kNo
chunk_idYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior3/5

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

No annotations are provided, so the description must carry behavioral disclosure. It mentions the maximum k=20 and that results include scores and text snippets. However, it does not state whether the source chunk must exist, if the operation is read-only, or how results are ordered. This is adequate but not thorough.

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 front-loaded with the purpose and is structured with Args and Returns. At 7 lines, it is reasonably concise, though the docstring format includes unnecessary line breaks. Still, every sentence contributes value.

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 tool's simplicity (2 parameters, no annotations, but has an output schema), the description covers the core behavior and return structure. It could mention prerequisites (e.g., 'chunk_id must exist') or error conditions, but for a retrieval tool this is largely complete.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/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 explain the parameters. It does so clearly: 'chunk_id: ID of the source chunk' and 'k: Number of similar results to return (max 20).' This adds full semantic value beyond the schema structure.

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 clearly states 'Find chunks similar to a given chunk by ID.' This is a specific verb-resource pair and distinguishes it from sibling tools like 'search' or 'search_graph' that serve different purposes.

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 gives no guidance on when to use this tool versus alternatives, nor any when-not-to-use conditions. For a tool that retrieves similar chunks, it would benefit from contextual cues like 'Use for finding related content; otherwise use search for general queries.'

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/moliver28/corpus-kb'

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