Skip to main content
Glama
laszlopere

mcp-bytesmith

hmac

Compute or verify HMAC authentication tags for data with a secret key. Supports multiple hash algorithms, input formats (text/hex/base64), and constant-time verification.

Instructions

Compute or verify an HMAC authentication tag over data with a secret key.

data and key are decoded with input_format / key_format. When expected is supplied, valid reports a constant-time comparison against the computed tag (tolerant of case/0x/whitespace in the expected value). Returns {algorithm, mac, output_format}, plus valid when expected is given. Example: hmac("msg", "key") -> mac "2d93cbc1be167bcb1637a4a23cbff01a..."

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
dataYesMessage to authenticate, decoded via `input_format`.
keyYesSecret key, decoded via `key_format`.
algorithmNoUnderlying cryptographic hash (HMAC digestmod): md5/sha1/sha2*/sha3*/blake2*. Default 'sha256'.sha256
input_formatNoHow `data` is decoded to bytes; default 'text'.text
key_formatNoHow `key` is decoded to bytes; default 'text'.text
output_formatNoHow the tag is rendered (bare hex, no 0x); default 'hex'.hex
expectedNoExpected tag to verify against, in `output_format`; case/`0x`/whitespace tolerated, compared constant-time. Default None skips verification.
Behavior4/5

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

With no annotations, the description carries the full burden. It discloses decoding of data/key, constant-time comparison for verification, tolerance of formatting in expected value, and the returned fields. It is transparent about the main behaviors.

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 concise, with two paragraphs and an example. It front-loads the main purpose and each sentence adds meaningful detail without redundancy.

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 7 parameters, the description fully explains purpose, parameter roles, behavior (decoding, verification), and return values. No output schema exists, but the description compensates by listing returned fields.

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 coverage is 100%, so baseline is 3. The description adds value by explaining decoding, constant-time comparison, and tolerance in expected format, beyond what the schema lists.

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 computes or verifies an HMAC authentication tag, specifying the verb and resource. It distinguishes from sibling tools like 'hash' and 'hash_file' by focusing on keyed HMAC authentication.

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 explains when to compute vs verify based on the 'expected' parameter. It does not explicitly mention alternatives, but the name and context imply its specific use for HMAC, which is clear enough for an agent.

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