Skip to main content
Glama

find_similar_code

Locate semantically similar code files or symbols by comparing vector embeddings to identify patterns and reuse opportunities.

Instructions

Vector similarity search using pgvector cosine distance. Pass a query_vector (embed your text with your native embedding capability first). Returns semantically similar symbols or files.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
query_vectorYesDense embedding vector produced by the agent for the search query
entity_typeNoRestrict results to files or symbols only
snapshot_idNoRestrict search to a specific snapshot
limitNoMax results (default 10)
Behavior2/5

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

With no annotations provided, the description carries full burden for behavioral disclosure. It mentions the search mechanism (pgvector cosine distance) and what gets returned (semantically similar symbols or files), but doesn't address important behavioral aspects like whether this is a read-only operation, performance characteristics, rate limits, authentication requirements, or what happens when no matches are found. For a search tool with zero annotation coverage, this leaves significant gaps.

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 appropriately concise with two sentences that get straight to the point. The first sentence explains the search mechanism and input requirement, while the second describes the return value. There's no wasted language, though it could be slightly more structured for clarity.

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

Completeness2/5

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

For a vector search tool with 4 parameters, no annotations, and no output schema, the description is incomplete. It doesn't explain the return format (what fields are included, how similarity scores are presented), doesn't mention error conditions, and provides minimal guidance on when this tool is appropriate versus other search methods. The agent would need to guess about important behavioral aspects.

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 documents all parameters thoroughly. The description adds minimal value beyond the schema, mentioning only that 'query_vector' requires embedding text first. It doesn't provide additional context about parameter interactions, typical values, or usage patterns that would help an agent understand the semantics better.

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 performs 'vector similarity search using pgvector cosine distance' and returns 'semantically similar symbols or files', which is a specific verb+resource combination. However, it doesn't explicitly differentiate from sibling tools like 'query_symbols' or 'get_symbol_neighbors' that might also search for code-related entities.

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 minimal usage guidance, mentioning only that the agent should 'embed your text with your native embedding capability first'. It doesn't indicate when to use this tool versus alternatives like 'query_symbols' or 'get_symbol_neighbors', nor does it specify prerequisites or appropriate contexts for vector search versus other search methods.

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/rdanieli/tentra-mcp'

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