read_imports
Extract import statements from source files to analyze dependencies without reading entire files. Use to understand module requirements before adding new imports.
Instructions
Return all import statements in a source file as a multi-line string. Read-only.
Use this when: You need to see a file's dependencies without reading the entire
file (e.g. before adding a new import, or to understand what a module uses).
Don't use this when: You want to add/remove imports -> use add_import /
remove_import.
Example: file_path="/abs/path/to/module.py"
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| file_path | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |