Skip to main content
Glama

x402 Toolbox

HMAC (SHA-256/384/512/1, MD5), e.g. to check a webhook signature

hmac
Read-onlyIdempotent

HMAC (SHA-256/384/512/1, MD5), e.g. to check a webhook signature. Computes HMAC of a message with a key (text, hex or base64). Optionally compares against an expected signature in constant time and reports whether it matches. Keys are not stored or logged. Price: $0.003 USDC per call via x402 (eip155:8453).

Input Schema

NameRequiredDescriptionDefault
keyYes
messageYes
expectedNoOptional signature to compare (hex or base64, optional "sha256=" prefix)
algorithmNosha256
keyEncodingNoutf8

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.2/5.0
Behavior5/5

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

Annotations already cover read-only/idempotent/non-destructive, yet the description still adds real behavioral context: constant-time comparison (a meaningful security property), an explicit guarantee that keys are neither stored nor logged, and the x402 payment cost with the network identifier. These are traits an agent cannot infer from the annotations or schema.

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?

Four compact sentences, front-loaded with purpose, then behavior, then privacy, then price — a sensible order. The opening clause substantially duplicates the title, which is the only wasted text.

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

Completeness4/5

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

With no output schema, the description must convey return semantics; it states that the comparison mode reports whether the signature matches, but it never says what the plain computation returns (hex digest format), which is a small but real gap for a tool with five parameters.

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 only 20% (only `expected` is documented), so the description must compensate, and it does: "key (text, hex or base64)" explains the `keyEncoding` enum values, the algorithm list mirrors the `algorithm` enum, and the constant-time comparison explains the `expected` parameter's behavior. `message` and the default behaviors are left to the schema, which is a minor gap.

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

Purpose4/5

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

The first sentence names a specific operation (HMAC computation), enumerates the supported algorithms, and gives a concrete use case (checking a webhook signature). The second sentence clarifies the verb+resource pair precisely. It does not differentiate from the sibling tool `hash`, which an agent could easily confuse with this one.

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?

"e.g. to check a webhook signature" gives a clear context for selecting this tool, and the description explains that the comparison against an expected signature is optional, which implies two modes. It stops short of naming when NOT to use it or pointing to the `hash` sibling for non-keyed digests.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.