Skip to main content
Glama

find_relevant_code

Locate code implementation by describing what you need; get relevant functions/methods with file:line ranges, signatures, and direct callers/callees.

Instructions

Find where something is implemented in this codebase. Returns a short list of functions/methods with file:line ranges and signatures (and, when known, their direct callers, callees and handlers). Read the ranges you need.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "query": "<query>"
    },
    "name": "find_relevant_code"
  }
}

Input Schema

NameRequiredDescriptionDefault
queryYesWhat you are looking for, in natural language or identifiers

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A3.9/5.0
Behavior4/5

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

With no annotations, the description carries the full burden and does substantial work: it discloses the return shape ('short list of functions/methods with file:line ranges and signatures') and notes optional enrichment with direct callers, callees and handlers, flagging that these may be absent via 'when known.' The instruction 'Read the ranges you need' correctly tells the agent the response is a pointer set rather than source text — a key behavioral distinction. It does not state ranking, result-count limits, or search semantics (exact vs. fuzzy), which keeps this below a 5.

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?

Three short sentences, front-loaded with the purpose, then the return contract, then the consumer action. No filler, no restatement of the tool name, and every sentence contributes information an agent needs before calling.

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?

There is no output schema, so the description must describe returns — and it does, including the file:line/signature structure and conditional caller/callee data. For a single-parameter, one-shot lookup tool this is close to sufficient; the remaining gap is guidance on how to phrase queries or what to do when the short list comes back empty or ambiguous.

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?

Only one parameter exists and its schema description already covers both natural-language and identifier forms, so the schema does most of the work. The description adds genuine meaning by scoping the query to 'in this codebase' and to implementation locations specifically, clarifying that the query should express a 'where is X implemented' intent rather than a free-form search string.

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 opens with a concrete verb and target: 'Find where something is implemented in this codebase,' which tells an agent exactly what class of question this tool answers. There are no sibling tools to differentiate from, so the lack of comparison language is not a defect, but the purpose is stated in terms of the problem solved rather than the artifact returned.

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

Usage Guidelines3/5

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

Usage is implied rather than prescribed: the phrasing 'where something is implemented' signals a discovery/lookup phase, and 'Read the ranges you need' gives a follow-up workflow. There is no explicit when-not guidance (e.g., don't use for reading a known file, don't use for whole-file retrieval), so an agent must infer the boundary conditions.

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

Deploy Server

Other Tools