Compute file checksum
compute_file_checksumCompute a single file's MD5, SHA-1, SHA-256, or SHA-512 hash to compare it with a copy or published digest without transferring the file.
Instructions
Compute one file's hash (md5, sha1, sha256 or sha512). Use when: comparing a file with a copy or a published digest without transferring it. Instead: compute_tree_checksums for a folder (or a file, as a list); scan_duplicates to find identical files. Behavior: read-only. Uses the backend's own hash in that algorithm when it has one (e.g. sha256sum over SSH), else streams the file. Refuses secret files. A folder or missing path fails. Time limit: 5 min. Returns: {value (hex digest), algorithm, source (native|stream)}.
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": "compute_file_checksum"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | No | The file to hash (absolute, or relative to the MCP root). Required unless path_b64 is given. | |
| backend | No | Backend id from list_backends; omit for the default. | |
| path_b64 | No | path as base64 of its raw bytes, for non-UTF-8 names; replaces path. | |
| algorithm | No | The hash algorithm. | sha256 |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| value | Yes | ||
| source | Yes | ||
| algorithm | Yes |