Skip to main content
Glama

find_related

Find code chunks semantically similar to a given file and line number. Enter the exact file path and line from search results to retrieve related snippets with context.

Instructions

Find code chunks semantically similar to a known file and one-based line.

Use this after search returns a promising location. Pass the file path exactly as it appears in a result and a line inside that chunk. Results include formatted text for context injection and structured fields.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
file_pathYesRepository-relative file path exactly as shown in a search result.
limitNoMaximum number of related chunks to return.
lineYesOne-based line number inside the known chunk.
profileNoSaved profile to use for source defaults.
sourceNoGit URL or local path. Omit only when the server has a default source.
Behavior3/5

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

With no annotations provided, the description carries the full burden. It implies a read operation ('find') and mentions return types ('formatted text and structured fields'), but does not disclose authentication needs, rate limits, or side effects.

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 two sentences, front-loaded with the core purpose, and each sentence serves a distinct role (purpose + usage/outcome) without redundancy.

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 the tool's complexity (5 parameters, no output schema), the description covers the main intent and output but lacks details on ordering, chunk definition, or result structure, leaving moderate gaps.

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 input schema has 100% coverage with adequate descriptions. The tool description adds minimal value beyond the schema (e.g., reinforcing file_path usage), but does not significantly enhance understanding of the parameters.

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 explicitly states the action ('find code chunks semantically similar') and the resource ('a known file and one-based line'), and distinguishes from siblings by recommending use after 'search'.

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?

It explicitly positions the tool in a workflow ('Use this after search returns a promising location.') and provides a concrete instruction ('Pass the file path exactly as it appears in a result'), but lacks when-not-to-use guidance or comparison with alternative siblings like get_chunk.

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/tristanmanchester/sifs'

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