---
source: src/server.rs
expression: "schema_description_for(\"get_file_snapshots\")"
---
⚠ COST WARNING: This is the most expensive tool in the toolkit. A single
call with default flags returns (before_len + after_len) bytes PER path —
typically 5–20k tokens for a single modified source file. Use this
instead of `git show <sha>:<path>` or `git show <sha> -- <path>` only
when you genuinely need the raw before/after source; for everything
else, the cheaper tools below already encode the answer.
Before calling this tool:
1. Call `get_change_manifest` first — it returns function-level change
types, line counts, signature diffs, and import changes. For most
"what changed?" questions this is all you need.
2. Call `get_function_context` next — it returns callers, callees, and
test references for every changed function. Combined with (1), this
answers "what changed and what might break".
3. Only call `get_file_snapshots` when you need to read the actual
source of a specific hunk — and when you do:
- Pass `line_range: [start, end]` to narrow the response
- Pass `include_before: false` if you only need the current state
- Call with one path at a time; token cost scales linearly
- Pass `include_diff_hunks: true` to get unified-diff hunk boundaries
(old_start, old_lines, new_start, new_lines) for each file, useful
for computing diff-relative line positions (e.g., GitHub inline
review comments). Only emitted for modified files where both before
and after exist. Default false.
Returns complete before/after file content at two git refs for
specified file paths.