Skip to main content
Glama

toolkit-mcp-server: hash value

toolkit_hash_value
Read-onlyIdempotent

Generate or verify cryptographic digests of values. Use 'generate' for a hash or 'compare' for timing-safe verification against an expected digest, ideal for checksum validation.

Instructions

Generate a cryptographic digest of a value, or verify a value against an expected digest. Set operation to "generate" for a lowercase-hex digest, or "compare" to constant-time-check value against the expected digest — compare is timing-safe and avoids manual string equality checks. Algorithm defaults to sha256; sha512 is also secure, while md5 and sha1 are exposed for checksum and file-integrity compatibility ONLY and must not be used for passwords, signatures, or any security purpose. inputEncoding controls how value and expected are read before hashing (utf8 default, or hex/base64 for raw binary data) so binary blobs need no decode round-trip. The canonical use is matching a download against a vendor-published checksum.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
valueYesThe data to hash, interpreted per inputEncoding (raw text by default).
expectedNoThe expected lowercase-hex digest to compare against. Required when operation is "compare".
algorithmNoDigest algorithm. sha256 (default) or sha512 for security; md5/sha1 are checksum/compat only — not for security.sha256
operationNo"generate" produces a digest; "compare" constant-time-checks value against expected.generate
inputEncodingNoHow value (and expected's pre-image, when relevant) is decoded before hashing: utf8 text, hex, or base64.utf8

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
digestNoLowercase-hex digest of value. Present for operation "generate".
matchesNoConstant-time equality of the computed digest against expected. Present for operation "compare".
algorithmYesThe algorithm used.
operationYesThe operation performed.
lengthInBytesNoDigest size in bytes (32 for sha256, 64 for sha512, 20 for sha1, 16 for md5). Present for "generate".
Behavior5/5

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

Annotations already indicate readOnlyHint and idempotentHint, but the description adds significant behavioral context: timing safety of compare, algorithm security levels, input encoding handling, and the fact that binary blobs need no decode round-trip. No contradictions with annotations.

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

Conciseness5/5

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

The description is a single well-structured paragraph that front-loads the core purpose, then systematically covers operations, algorithms, input encoding, and a canonical use case. Every sentence adds necessary information without redundancy or filler.

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?

Given the tool's moderate complexity (5 parameters, all described in schema, output schema present, annotations provided), the description covers all key aspects: dual operations, algorithm choices with security implications, input encoding details, and a practical use case. There are no obvious gaps.

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

Parameters4/5

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

Schema description coverage is 100%, each parameter has a description. The tool description adds value beyond schema by explaining the practical semantics: e.g., inputEncoding avoids decode round-trips, algorithm security warnings, and that expected is required for compare. This extra context justifies a score above the baseline of 3.

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 two purposes: generating a cryptographic digest or verifying a value against an expected digest. It uses specific verbs ('Generate' and 'verify') and identifies the resource (a cryptographic hash). The tool is easily distinguished from sibling tools (encoding, ID generation, QR, geolocate) which have completely different functions.

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

Usage Guidelines5/5

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

The description explicitly explains when to use each operation ('generate' vs 'compare') and provides critical usage warnings: compare is timing-safe, md5/sha1 are for checksum compatibility only and must not be used for security. It also gives a canonical use case (matching a download checksum), offering clear context for appropriate tool selection.

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/cyanheads/toolkit-mcp-server'

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