Skip to main content
Glama
laszlopere

mcp-bytesmith

hash_file

Compute a cryptographic or non-cryptographic checksum of a file on disk and optionally verify it against an expected digest.

Instructions

Checksum a file on disk, optionally verifying it against an expected digest.

Crypto digests stream the file in 1 MiB chunks; CRC/xxh/fnv read it whole. When expected is supplied, verified reports whether it matches the digest (compared as bytes, so case/0x/whitespace differences are tolerated). Returns {algorithm, digest, path, size}, plus verified when expected is given. Example: hash_file("/etc/hostname", "sha256") -> {digest, path, size, ...}

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathYesFilesystem path of the file to checksum.
algorithmNoDigest algorithm: crypto (md5/sha1/sha2/sha3/blake2*), CRC (crc8/16/32/32c/64), xxhash, or fnv1a_*. shake_* is excluded (no `length` arg). Default 'sha256'.sha256
expectedNoExpected digest to verify against, in `output_format`; case/`0x`/whitespace tolerated. Default None skips verification.
output_formatNoHow the digest is rendered (bare hex, no 0x); default 'hex'.hex
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description fully discloses behavioral traits: how different algorithms process the file (crypto streams in chunks; CRC/xxh/fnv reads whole), how verification compares digests (as bytes, tolerant to case/0x/whitespace), and the return structure including optional 'verified' field. This provides comprehensive transparency.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is well-structured with key information front-loaded. It is slightly verbose but every sentence adds value. It could be slightly more concise, but overall it efficiently conveys necessary details without excessive wordiness.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Despite lacking an output schema, the description thoroughly explains the return value structure (algorithm, digest, path, size, and optional verified). It covers all parameters, algorithm categories, verification behavior, and provides an example, making it fully complete for an agent to understand the tool's functionality.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Although schema coverage is 100%, the description adds significant meaning beyond the schema: it explains the streaming vs. whole-file behavior for algorithm categories, details the verification comparison logic, and gives an explicit example. This enhances understanding of parameter usage and behavior.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's purpose: 'Checksum a file on disk, optionally verifying it against an expected digest.' It uses a specific verb ('checksum') and resource ('file on disk'), and distinguishes itself from sibling tools like 'hash' by explicitly focusing on disk files.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implicitly guides usage by specifying the tool is for files on disk, and it describes behavioral differences between algorithm families (streaming vs. whole-file). However, it does not explicitly state when not to use this tool or mention alternatives (e.g., 'hash' for in-memory hashing), but the context is clear enough for an agent to select appropriately.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/laszlopere/mcp-bytesmith'

If you have feedback or need assistance with the MCP directory API, please join our Discord server