peek_file
View file summaries to check public interfaces without opening files, reducing context costs by displaying cached API structures or full contents as needed.
Instructions
Get a summary of a file's public interface without changing the active file. Useful for checking APIs of files you've already worked on.
Returns:
For the active file: full contents
For previously read files: cached summary (public structs, functions, traits, etc.)
For unsupported file types: full contents
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": "peek_file"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | Path to the file to peek at |