get_file_content
Read file contents with language detection, line numbers, and metadata. Supports specifying line ranges for precise extraction.
Instructions
Read a file's contents with language detection, line numbers, and metadata. Supports reading specific line ranges.
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": {
"path": "<path>"
},
"name": "get_file_content"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | Absolute path to the file to read | |
| startLine | No | First line to return (1-based, default: 1) | |
| endLine | No | Last line to return (inclusive, default: end of file) | |
| projectRoot | No | Project root for computing relative path |