get_source_context
Retrieve source code context around a specific line in a file during debugging. Specify the file path, line number, and number of surrounding lines to view.
Instructions
Get source context around a specific line in a file
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"sessionId": "<sessionId>",
"file": "<file>",
"line": "<line>"
},
"name": "get_source_context"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| file | Yes | Path to the source file. Use absolute paths or paths relative to your current working directory | |
| line | Yes | Line number to get context for | |
| sessionId | Yes | ||
| linesContext | No | Number of lines before and after to include (default: 5) |