Skip to main content
Glama

Keccak256, function selector: Keccak-256 hash, 4-byte selector and event topic

keccak
Read-only

Keccak-256 hash (the Ethereum hash) of text or of 0x hex bytes, as used for function selectors, event topics and storage slots. Use when building or decoding EVM calls. Example: text=transfer(address,uint256). Price $0.01/call via x402 USDC or a card key (/credits), first 10 free; failed calls free. Reads or computes only and changes nothing; each call is charged, so repeats are not free.

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

Input Schema

NameRequiredDescriptionDefault
textYesText, or 0x-prefixed hex bytes, up to 10,000 characters

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A3.6/5.0
Behavior3/5

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

Annotations already declare readOnly=true, idempotent=false and destructive=false; the description reinforces this and adds genuinely useful economics ($0.01/call, first 10 free, failed calls free, repeats not free), which explains the idempotentHint=false. However, it never says what the output looks like, and the title's mention of a '4-byte selector' leaves ambiguous whether the selector is returned alongside the hash.

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?

What the tool does and when to use it are front-loaded, and the pricing sentence earns its place by explaining non-free repeats. The sentence is dense and mixes purpose, usage, pricing and safety in one long run-on, but no clause is pure filler.

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 tool with no output schema, the main missing piece is the return value: whether you get a 32-byte hash, a 4-byte selector, or both, which the title hints at but the description never resolves. Billing and safety are well covered, so the gap is narrow but real.

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 coverage is 100% for the single 'text' parameter, so the schema already documents both the text/hex duality and the 10,000-character limit. The description restates the input forms and adds only the illustrative example, which slightly clarifies the calling convention but adds little beyond the schema.

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 a specific operation (Keccak-256 hash), the accepted input forms (text or 0x hex bytes), and the concrete uses (function selectors, event topics, storage slots). It does not explicitly distinguish itself from the sibling 'hash' or 'pack_hash_toolbox', so an agent must infer the difference from the EVM framing.

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 when building or decoding EVM calls" gives a clear triggering context, and the transfer(address,uint256) example anchors it. There are no exclusions or named alternatives telling the agent when to prefer the generic hash sibling instead.

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