verify_log
Re-walks the log's hash chain to detect accidental edits and report the first mismatched line; returns chain_ok false when the log does not exist.
Instructions
Re-walk the log's hash chain and report the first line that does not fit, if any.
This catches accidental and naive edits. The hashes are not keyed, so a rewrite that recomputes every later hash, or a cut-off tail, is caught only by comparing head_sha256 with a copy kept elsewhere. A log that does not exist yet reports chain_ok false.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "verify_log"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | ||
| lines | Yes | ||
| reason | Yes | ||
| chain_ok | Yes | ||
| head_sha256 | Yes | sha256 of the last line's bytes (without its newline; not its own sha256 field). The chain catches accidental and naive edits; a rewrite that recomputes every hash, or a cut-off tail, is caught only by comparing against a head hash kept elsewhere | |
| first_bad_seq | Yes |