lean_declaration_file
Retrieve the source code of a symbol's declaration in a Lean file with optional surrounding context lines. Specify the file path and symbol to get the declaration snippet, or request the entire file for larger investigations.
Instructions
Get the source of a symbol's declaration (declaration slice + context).
Set full_file=True for the whole file (can be very large).Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| symbol | Yes | Symbol (case sensitive, must be in file) | |
| file_path | Yes | Absolute or project-root-relative path to Lean file | |
| full_file | No | Return the entire declaration file (large!) | |
| context_lines | No | Lines of context around the declaration |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| content | Yes | Declaration source (sliced unless full_file=True) | |
| end_line | No | Last line of the returned slice (1-indexed) | |
| file_path | Yes | Path to declaration file | |
| start_line | No | First line of the returned slice (1-indexed) | |
| total_lines | No | Total lines in the declaration file |