read_file
Retrieve relevant file sections from large indexed files using a query, with fallback to full content for non-indexed files.
Instructions
Smart file reading with index awareness.
If the file is indexed and large, returns relevant chunks instead of full content. Falls back to raw file reading for non-indexed files.
Args: file_path: Absolute path to the file to read query: Optional search query to find relevant sections in large files project: Project ID (default: auto-detect from file path)
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": "read_file"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| query | No | ||
| project | No | ||
| file_path | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |