Read file from OpenGrok
opengrok_get_fileRead line-numbered source file content from an OpenGrok project using the full path returned by search. Use start_line and end_line to limit large files.
Instructions
Read a file's content (line-numbered) by the full path returned from search, e.g. "//dir/file.c". Use start_line/end_line for large files; output is cut at 30000 characters.
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": {
"file_path": "<file_path>"
},
"name": "opengrok_get_file"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| end_line | No | Last line (1-based, inclusive). | |
| file_path | Yes | Full path as returned by search, starting with "/<project>/". | |
| start_line | No | First line (1-based, inclusive). |