Find related files
related_filesFind 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
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | Seed file, or up to 16 seed files, within the effective selection. | |
| branch | No | Remote Git branch; invalid for local projects. | |
| profile | No | Selection 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. | |
| project | No | unique listed name, absolute path returned by list_projects, or #index. | |
| direction | No | Chooses outward dependencies, inward dependents, or both. | both |
| git_scope | No | Narrows to staged, changed (including untracked files), or diff:<ref>..<ref> paths; content stays from the current working tree. | |
| tracked_only | No | Restricts results to Git-tracked files; accepts a boolean or its string form. | |
| max_file_bytes | No | Excludes selected files larger than this byte count; accepts an integer or numeric string. | |
| exclude_patterns | No | Removes paths with the same project-relative glob syntax as include_patterns. | |
| include_patterns | No | Narrows with project-relative '/' globs: '*' and '?' stay in one segment, '**/' spans depths, and '{a,b}' alternates; matching is case-sensitive, while '!' and '[...]' are rejected. |