Skip to main content
Glama

MAD Synapse · Utils

Hash + encode/decode

hash_encode
Read-onlyIdempotent

Hash data (SHA-256/512, SHA3, Keccak-256, BLAKE2, MD5, SHA-1, RIPEMD-160, HMAC) and convert between utf8, hex, base64, base64url and base58 — exact, in one call. Useful for signatures, content addressing, EVM selectors (keccak of a function signature), and decoding blobs agents are handed. Input can itself be hex/base64/base58. Price: free. Errors: returns isError with a message for invalid input or an upstream failure (not charged).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
inputYesData to hash or re-encode.
hashesNosha256, sha512, sha3-256, sha3-512, keccak256, blake2b512, blake2s256, md5, sha1, ripemd160. 0-12 items. Default ["sha256","keccak256"].
hmac_keyNoif set, HMAC instead of plain hash (utf8 key)
input_encodingNoHow the input string is encoded. One of "utf8", "hex", "base64", "base58". Default "utf8".utf8

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
bytesNo
hashesNo
encodingsNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.4/5.0
Behavior4/5

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

Annotations already declare readOnly, idempotent, and non-destructive. The description adds value beyond them by disclosing pricing (free) and error behavior (returns isError, not charged), plus the 'exact, in one call' determinism claim.

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?

It is front-loaded with the core capability and packs use cases, pricing, and error semantics into a compact form with no filler. Slightly dense, but every clause earns its place.

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?

With an output schema present, return values need no explanation. The description covers algorithms, encodings, use cases, pricing, and error handling, leaving nothing essential for correct invocation unstated.

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 parameters are documented regardless. The description nonetheless adds meaning: it notes the input can itself be hex/base64/base58, mentions HMAC behavior, and lists base64url, which the schema enum omits.

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 states a specific verb set (hash and encode/decode) with enumerated algorithms and encodings, and clarifies it does both in one call. An agent can immediately tell this apart from siblings like jwt_decode or text_stats.

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?

It names concrete use cases (signatures, content addressing, EVM selectors, decoding handed blobs), which gives clear context for when to reach for it. It stops short of stating when NOT to use it or naming an alternative, but no sibling overlaps meaningfully.

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