hash
Compute hash digests of files or stdin with selectable algorithm (MD5, SHA-1, SHA-2, BLAKE2b). Returns JSON with per-file digests and byte counts.
Instructions
Compute hash digests of files or stdin with selectable algorithm (MD5, SHA-1, SHA-2, BLAKE2b). Read-only, no side effects. Returns JSON with per-file digests and byte counts. Use when you need flexible algorithm selection from a single tool. Not for fixed-algorithm workflows — use dedicated tools ('md5sum', 'sha256sum', 'b2sum') for consistent output. See also 'md5sum', 'sha256sum', 'b2sum'.
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": "hash"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| check | No | Read checksums from FILE(s) and verify them. | |
| paths | No | Files to hash, or '-' for stdin (omit with --check). | |
| encoding | No | Text encoding (default: utf-8). Use 'auto' for BOM/autodetection. | utf-8 |
| algorithm | No | Hash algorithm. | sha256 |
| show_encoding | No | Include encoding detection metadata in JSON result. | |
| encoding_errors | No | How to handle encoding errors (default: replace). | replace |
| encoding_profile | No | Locale-aware encoding fallback profile for auto-detection. |