get_contract_source
Retrieve a contract's source code from the Solidity file, with optional line range filtering for focused analysis.
Instructions
Retrieves the source code of a contract from the original Solidity file. Use this when you need to read the actual implementation after finding a contract with list_contracts. Returns the source code as a string with optional line range filtering via start_line and max_lines parameters. Only returns the contract's portion of the file; for the full file, read it directly.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| request | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| success | Yes | ||
| file_path | No | File path relative to project directory | |
| truncated | No | True if the source was truncated due to max_lines limit | |
| source_code | No | ||
| total_lines | No | Total number of lines in the source file | |
| error_message | No | ||
| returned_lines | No | Line range returned (start, end) - 1-indexed, inclusive |