[analysis]
Reads a bounded text window from a file inside the loaded workspace.
Agents need enough file and API context to act without dumping entire source files into the prompt.
The model can read bounded source windows, outlines, and export surfaces before choosing the next specific tool.
Try it locally in the TGlider playground
| Name | Type | Required | Description |
|---|---|---|---|
| filePath | string | Yes | Workspace-relative or absolute file path. |
| startLine | number | No | First 1-based line to read. |
| lineCount | number | No | Maximum number of lines to read. |
Read a focused source window
{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "get_file_contents",
"arguments": {
"filePath": "src/app.ts",
"startLine": 20,
"lineCount": 80
}
}
}Returns a bounded text window, total line metadata, and live-document version state.