Skip to main content
Glama

find_relevant_code

Read-onlyIdempotent

Find repository files related to an issue or task via keyword search, returning paths, roles, snippets, and reasons to guide code investigation.

Instructions

Find files likely related to an issue or task, using keyword search.

Each result has file path, role (source/test/docs/config), matching line numbers with snippets, and a plain-language reason. These are leads to verify, not conclusions.

Args: path: Repository directory. Relative paths are resolved against the first approved root. query: The issue title/body or task description (names, features, error text). max_results: How many files to return (1-25).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathYes
queryYes
max_resultsNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.5/5.0
Behavior4/5

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

Annotations already declare readOnlyHint, idempotentHint, and non-destructive behavior, so the safety profile is covered. The description adds meaningful context beyond that: it warns that results are unverified leads and describes the shape of each result (path, role, matching lines, reason). It does not discuss ranking or match-confidence limits.

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?

Front-loaded with purpose, then a results sentence, then a tidy Args block. Every sentence adds information and nothing is repeated from the schema.

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?

An output schema exists, so return-value explanation is technically optional, yet the description still summarizes result fields usefully. With all three parameters documented and usage context provided, an agent has everything needed to call this correctly.

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

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, so the description carries the burden and largely succeeds: path resolution against the first approved root, query as issue/task text, and the 1-25 range for max_results are all explained. Only the default value and the exact interpretation of 'role' classification are left implicit.

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?

States a specific verb (find), resource (files related to an issue/task), and the mechanism (keyword search), with a scope qualifier ('likely related'). An agent can distinguish this from inspect_repository and get_setup_guide, which serve inspection and setup rather than issue-driven 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?

Gives clear context for when to use it ('related to an issue or task') and specifies what the query should contain (issue title/body, error text, names). It also cautions that results are leads to verify, not conclusions. It stops short of explicitly excluding cases where inspect_repository would be preferable.

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