Skip to main content
Glama

hash_generate

Read-only

Generate a SHA-256 or SHA-512 digest of UTF-8 text in hexadecimal or Base64 form. Use it for checksums, cache keys or comparing content; it is a plain digest, not a keyed HMAC or a password hash. Runs without network access and does not store your input. Input up to 100,000 bytes; larger input is an error. Returns algorithm, encoding, digest and bytes (input length). Defaults: sha256, hex; any other algorithm or encoding is an error.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "text": "<text>"
    },
    "name": "hash_generate"
  }
}

Input Schema

NameRequiredDescriptionDefault
textYesInput text, up to 100 KB.
encodingNoOutput encoding. Default hex.
algorithmNoHash algorithm. Default sha256.
l402_proofNoL402 payment proof "<macaroon>:<preimage>". Omit on the first call; an unpaid call returns a 0 sat Lightning invoice and the macaroon. Pay the invoice, then repeat the call with this argument set.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedInput schema / properties / l402_proof / description
      Previous value: -"L402 payment proof \"<macaroon>:<preimage>\". Omit on the first call; an unpaid call returns a 5 sat Lightning invoice and the macaroon. Pay the invoice, then repeat the call with this argument set."New value: +"L402 payment proof \"<macaroon>:<preimage>\". Omit on the first call; an unpaid call returns a 0 sat Lightning invoice and the macaroon. Pay the invoice, then repeat the call with this argument set."
  2. Changed1 schema field changed
    • addedInput schema / properties / l402_proof
      Added value: +{
      +  "description": "L402 payment proof \"<macaroon>:<preimage>\". Omit on the first call; an unpaid call returns a 5 sat Lightning invoice and the macaroon. Pay the invoice, then repeat the call with this argument set.",
      +  "type": "string"
      +}
  3. Added

TDQS

A4.2/5.0
Behavior4/5

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

With readOnlyHint/destructiveHint already declaring the safety profile, the description adds real behavioral detail: a 100,000-byte input ceiling with hard error on overflow, the exact return fields (algorithm, encoding, digest, bytes), defaults, and the no-storage property. One tension: it says it "runs without network access" while openWorldHint=true and the schema's l402_proof parameter implies a Lightning payment round-trip that the description never mentions.

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?

Three tight sentences, front-loaded with what the tool does before use cases, limits, and return shape. Every clause carries information (output form, size cap, defaults, error behavior) with no filler.

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?

For a stateless hash utility it covers the essentials an agent needs: size limit, defaults, error conditions, and return fields, which matters since there is no output schema. The omission is the payment path — a caller hitting the unpaid-invoice response learns about it only from the l402_proof parameter description.

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

Parameters3/5

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

Schema description coverage is 100%, so all four parameters are already documented, including the L402 payment flow. The description only echoes the stated defaults and notes that out-of-enum values are an error, adding little beyond the schema's own enum and default semantics.

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 first sentence names a specific verb (generate) and resource (SHA-256/SHA-512 digest of UTF-8 text) plus the output forms, so an agent knows exactly what it produces. It also carves out what it is NOT (a keyed HMAC or a password hash), which separates it from superficially similar cryptographic helpers.

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?

"Use it for checksums, cache keys or comparing content" gives concrete positive use cases, and the HMAC/password-hash exclusion tells the agent when to look elsewhere. It stops short of naming a sibling alternative, so it is clear context rather than full routing guidance.

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