Skip to main content
Glama

security-crypto

hmac_sign_and_verify

Compute or timing-safe verify HMAC-SHA256 / HMAC-SHA512 message authentication codes.

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": "hmac_sign_and_verify"
  }
}

Input Schema

NameRequiredDescriptionDefault
textNo
secretNosecret-key
algorithmNosha256
verifyHexNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

C2.7/5.0
Behavior2/5

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

No annotations are supplied, so the description carries the full behavioral burden. It does mention 'timing-safe' verification, which is a genuine security-relevant trait, but it says nothing about the return value shape, how verification reports success or failure, or the risky behavior of defaulting secret to 'secret-key'.

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 definition is a single front-loaded sentence with no filler words or redundancy. Its brevity is appropriate stylistically, though here the terseness reflects under-specification rather than economy.

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

Completeness2/5

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

This tool has two distinct modes, four undocumented parameters, no annotations and no output schema, yet it is described in one sentence. An agent cannot reliably determine mode selection, output format, or the consequences of the defaulted secret from this definition.

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

Parameters2/5

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

Schema description coverage is 0% across four parameters, and the description compensates only partially by naming the two hash algorithms. It does not explain text encoding, the awkward default secret, or whether verifyHex must be lowercase hex and what happens on malformed input.

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?

States specific verbs (compute, timing-safe verify) and a specific resource (HMAC-SHA256/SHA512 message authentication codes), which is far more useful than the bare name. It implicitly distinguishes itself from password_kdf_hash_and_verify by naming the algorithm family, but it never explicitly says how it differs from that sibling.

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

Usage Guidelines2/5

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

There is no when-to-use or when-not-to-use guidance, and no explicit statement about how the tool chooses between its compute and verify modes. The reader must infer that supplying verifyHex switches to verification, and nothing warns against using the default secret in a real security context.

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.

Resources