Skip to main content
Glama

Find related files

related_files
Read-only

Find evidenced dependencies and dependents for up to 16 seed files without widening selection, returning paths, evidence, resolution status, and scope.

Instructions

Finds evidenced dependencies and dependents for one to 16 seed files without widening selection. Use it after search_project or get_tree; use search_project for text references or get_file for content. Returns paths, evidence, resolution status, token estimates, language coverage, partial-parse and configuration diagnostics, and scope; results above 50,000 characters use read_pack. Key parameters: path, direction=dependencies|dependents|both, profile, git_scope, include_patterns, exclude_patterns, and max_file_bytes. Project: unique listed name, absolute path returned by list_projects, or #index.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathYesSeed file, or up to 16 seed files, within the effective selection.
branchNoRemote Git branch; invalid for local projects.
profileNoSelection profile: standard uses all eight exclusion toggles plus gitignore; local uses the desktop profile listed by list_projects.profiles; otherwise give a portable profile path inside the project.
projectNounique listed name, absolute path returned by list_projects, or #index.
directionNoChooses outward dependencies, inward dependents, or both.both
git_scopeNoNarrows to staged, changed (including untracked files), or diff:<ref>..<ref> paths; content stays from the current working tree.
tracked_onlyNoRestricts results to Git-tracked files; accepts a boolean or its string form.
max_file_bytesNoExcludes selected files larger than this byte count; accepts an integer or numeric string.
exclude_patternsNoRemoves paths with the same project-relative glob syntax as include_patterns.
include_patternsNoNarrows with project-relative '/' globs: '*' and '?' stay in one segment, '**/' spans depths, and '{a,b}' alternates; matching is case-sensitive, while '!' and '[...]' are rejected.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv5.2.0

TDQS

A4.1/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=true, destructiveHint=false, openWorldHint=false, so the safety profile is covered structurally. The description adds genuinely useful behavior beyond that: the returned payload contents (paths, evidence, resolution status, token estimates, diagnostics, scope) and the truncation contract that results above 50,000 characters must be fetched via read_pack. It does not, however, explain the idempotentHint=false implication or any error/failure modes for unresolvable seeds.

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?

Front-loaded with the core purpose, then usage routing, then return contract, then parameters — a sensible priority order with no filler sentences. It is dense and a single paragraph, so the parameter list reads as a run-on rather than clearly separated, but every sentence carries information.

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?

With 10 parameters, no output schema, and only one required param, the description carries the burden of explaining results and does so (return fields, read_pack handoff for large results, project identifier forms). It stops short of clarifying git_scope/branch interaction with local projects or failure behavior on unresolvable seeds, which matters for a non-idempotent analysis call.

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 every parameter including direction, profile, git_scope, include/exclude_patterns and max_file_bytes is already documented in the schema. The description's 'Key parameters' list restates those names and the direction enum values without adding syntax, defaults, or precedence rules beyond what the schema provides. Baseline 3 applies.

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 precise verb and resource ('Finds evidenced dependencies and dependents for one to 16 seed files') plus a scope constraint ('without widening selection'). It explicitly differentiates itself from siblings by naming search_project for text references and get_file for content, so an agent can route correctly without opening a schema.

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?

Gives explicit sequencing ('Use it after search_project or get_tree') and names the two alternative tools with the conditions that select them (text references vs. content). When-to-use and when-to-use-something-else are both covered.

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