head_log
Read the first lines of a log file using token-based pagination to stay within AI context limits. Specify filename and optionally lines or max tokens.
Instructions
Reads the beginning of a log file (like Unix 'head' command). Uses token-based pagination to respect AI context limits.
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": {
"filename": "<filename>"
},
"name": "head_log"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| lines | No | Number of lines to read from the beginning. If not specified, uses token-based limit. | |
| filename | Yes | Name of the log file to read | |
| max_tokens | No | Maximum tokens to return (default: 4000, max: 100000). Uses ~4 chars per token estimation. |