who_touched
Aggregate git blame results by author for a file. Displays line counts, commit counts, and primary owner. Optionally scope analysis to a specific line range.
Instructions
Read-only. Code ownership for a file via git blame, aggregated by author. Returns each author's line count, commit count, and most recent commit date, plus the primary_owner (most lines). Pass line_start/line_end to scope to one region (e.g. a single function). Errors if cwd is not a git repo or file is untracked. Cost scales with file size; instant for typical files.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| cwd | No | Path inside the target git repo. Defaults to the server's current working directory. | |
| file | Yes | File path relative to the repo root, e.g. `src/auth.ts`. | |
| function | No | Optional label echoed back in the result; cosmetic only, does not change the blame range. | |
| line_end | No | Optional 1-based end line (inclusive). Must be paired with `line_start`. | |
| line_start | No | Optional 1-based start line. Must be paired with `line_end` to take effect. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| file | No | ||
| authors | No | ||
| total_lines | No | ||
| primary_owner | No | Name of the author with the most lines. |