Skip to main content
Glama

cast_keccak

Compute the Keccak-256 hash of string or hex data to generate Ethereum-compatible digests for identifiers, checks, and on-chain data verification.

Instructions

Compute the Keccak-256 hash of data (cast keccak).

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": {
      "data": "<data>"
    },
    "name": "cast_keccak"
  }
}

Input Schema

NameRequiredDescriptionDefault
dataYesData to hash (string or hex)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

C2.9/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 entire behavioral burden, and it discloses nothing beyond the operation name. It does not say the function is pure and side-effect free, does not state the return format (presumably a 0x-prefixed 32-byte hex string), and does not resolve the critical ambiguity of whether a plain string input is UTF-8 encoded or hex-decoded before hashing. That ambiguity materially changes the resulting digest.

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?

A single short sentence with the operation front-loaded and nothing extraneous. The trailing '(cast keccak)' merely restates the tool name and earns no place, but the cost is trivial.

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

Completeness3/5

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

For a one-parameter pure function with full schema coverage and no output schema, very little is required. Still missing are the output shape (hex digest) and the input encoding rule, both of which an agent needs in order to call this correctly, and there is no output schema to defer to.

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% and the single parameter is documented as 'Data to hash (string or hex)', so the baseline is 3. The description adds nothing to that, and notably fails to clarify how the string-vs-hex distinction is interpreted, which is the one piece of meaning the schema leaves underspecified.

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?

Names a specific verb and resource: computes the Keccak-256 hash of supplied data. An agent can tell this is a hashing utility rather than a conversion, RPC, or send tool. It stops short of naming a sibling it supersedes or is confused with (e.g. cast_convert or cast_abi_encode, which also produce encoded output).

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 guidance, no exclusions, and no pointer to alternatives for related encoding needs. The only usage signal is implied by the tool name itself, which an agent must already understand before selecting it.

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