Read Source Context
read_source_contextAnnotate a hot function's source lines with sampled tick counts to reveal exact hotspots, reading only project files and warning when context lines fall outside the window.
Instructions
Read the actual source code for a hot function and annotate each line with sampled tick counts from positionTicks. The returned window is sized to cover the function's actual hot lines, not just the area around its declaration; if any ticks still fall outside it, a warning field reports how many and suggests a larger contextLines. Only reads files within the project root.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| profileId | Yes | Profile ID returned by load_profile | |
| contextLines | No | Minimum lines of padding around the function declaration and its hot lines (default: 10) | |
| functionName | Yes | Exact function name to look up |