Skip to main content
Glama

find_similar

Read-onlyIdempotent

Search for code semantically similar to a given snippet or code block.

Instructions

Code semantically similar to a snippet you already have, dense search only: use it before writing a function, to check whether something like it exists. search is the one to call when you can describe the need in words instead. Snippets are cut at 2000 chars.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
top_kNoMax results.
sourceNoSource name. Omit when only one source applies.
snippetYesCode block to match; cut at 2000 chars.

Schema Changelog

Changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. Addedv1.9.0

TDQS

A4.5/5.0
Behavior4/5

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

Annotations already declare readOnly, idempotent, and non-destructive behavior. The description adds meaningful behavioral constraints beyond those annotations: this is 'dense search only', and 'Snippets are cut at 2000 chars'. These details affect invocation expectations and are not inferable from the annotations alone.

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 three short, focused sentences. The core purpose is front-loaded, followed by usage guidance and a key constraint. There is no redundant or filler content; every sentence earns its place.

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

Completeness5/5

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

For a simple, read-only search tool with rich schema and annotations, the description covers what the tool does, when to use it, when not to use it, and an input limitation. The use case of checking for existing similar code makes the return intent clear, and the `top_k` parameter implies multiple results. No critical information is missing.

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 100%, so the schema already explains each parameter adequately. The description mostly reinforces the snippet truncation limit already stated in the schema and adds no additional semantic detail for `top_k` or `source`. This matches the baseline of 3 for high schema coverage.

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 a specific operation: finding code semantically similar to a provided snippet. It also explicitly contrasts with the sibling tool `search`, noting this is 'dense search only', which helps an agent distinguish it from other search-related tools without opening schemas.

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

Usage Guidelines5/5

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

It gives explicit when-to-use guidance: 'use it before writing a function, to check whether something like it exists'. It also names the alternative: '`search` is the one to call when you can describe the need in words instead', leaving no ambiguity about tool selection.

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

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/lorenzo-cambiaghi/LynxMCP'

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