read_symbol
Read the source code of a specific function, method, or class without loading the entire file. Supports Class.method syntax to target precise code sections.
Instructions
Read source code of ONE specific function/method/class — INSTEAD OF reading the whole file. Supports Class.method syntax.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | File path | |
| symbol | Yes | Symbol name, e.g. "UserService.updateUser" | |
| context_before | No | Lines of context before (default: 2) | |
| context_after | No | Lines of context after (default: 0) | |
| show | No | Display mode: full (all lines), head (first 50), tail (last 30), outline (head + methods + tail). Default: auto (full ≤300 lines, outline >300) | |
| include_edit_context | No | Append raw code block for Edit old_string (saves a read_for_edit call) | |
| session_id | No | Optional Claude Code session_id for cross-restart dedup (see smart_read). | |
| force | No | Bypass dedup (see smart_read.force). |