read_imports
Retrieve all import statements from a source file to quickly view its dependencies. Helps verify existing imports before adding new ones.
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 |