get_code
Retrieve the source code of a named function or class from a Python file, reading directly from disk to ensure accuracy.
Instructions
Get the full source of a single function or class by name. Always reads from disk — always current, never stale. Call get_signature() first to discover available symbol names and line ranges. Omit symbol to get module-level constants and assignments only. Note: Python files only. For other languages, read the file directly.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| symbol | No | Function or class name to retrieve. Omit for module-level constants. | |
| file_path | Yes | Relative file path |