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 25 free; failed calls free. Reads or computes only and changes nothing; each call is charged, so repeats are not free.

Input Schema

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

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.3/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true and destructiveHint=false, so the safety profile is covered; the description usefully adds pricing ($0.01/call, 25 free, failed calls free) and the non-idempotent cost note, which matches idempotentHint=false. It does not describe the exact return shape (hash only vs. hash plus 4-byte selector), which is the remaining behavioral gap.

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?

Front-loaded with the definition and use case, then the example, then pricing. The pricing/free-tier sentence is longer than necessary for tool selection and could be trimmed, keeping it from a 5.

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?

With no output schema, the description must carry return semantics; the title's "4-byte selector and event topic" hints at outputs but the body only says it hashes, leaving ambiguity about whether a selector is returned alongside the hash. Everything else needed to call it (input format, cost, safety) is present.

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% and the schema documents the 10,000-character limit, so the baseline is 3; the worked example adds real value by showing the accepted input syntax (raw signature text rather than encoded calldata). It still doesn't clarify the 0x-hex byte branch with an example, so not a 5.

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?

States a specific operation (Keccak-256 hash) over a specific input (text or 0x hex bytes) and names the concrete uses (function selectors, event topics, storage slots). It is trivially distinguishable from every sibling, which are all chain-prefixed RPC lookups rather than a pure hashing utility.

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" plus a concrete example (text=transfer(address,uint256)) gives a clear triggering context. It stops short of explicit exclusions or alternatives (e.g. use eth_call to actually simulate the encoded call), so it earns a 4 rather than a 5.

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.