Skip to main content
Glama
laszlopere

mcp-bytesmith

ens_namehash

Compute the EIP-137 namehash and labelhash for any ENS name, returning both the full namehash and the keccak labelhash of the leftmost label.

Instructions

Compute the EIP-137 namehash (and labelhash) of an ENS name.

The name is hashed exactly as given; EIP-137 expects it already UTS-46 normalized (use unicode_normalize first if needed), and empty labels from a stray dot are rejected. Returns {name, namehash, labelhash}, where labelhash is the keccak of the leftmost label — for a single label that is the .eth registrar token id for that name.

Example: ens_namehash("vitalik.eth") -> namehash="0xee6c4522aab0003e8d14cd40a6af439055fd2577951148c14b6cea9a53475835".

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameYesA dot-separated ENS name, e.g. 'vitalik.eth' (''=the root). EIP-137 expects it ALREADY UTS-46 normalized — run unicode_normalize first if it may contain uppercase/unicode. Empty labels (leading/trailing/double dots) are rejected.
Behavior5/5

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

With no annotations, the description fully discloses behavior: it hashes as given, warns about normalization, rejects empty labels, and describes the output structure including an example. This is comprehensive.

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?

Two sentences plus a return explanation and example. Purpose is front-loaded, no unnecessary words. Every sentence adds value.

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?

Given the tool's specificity and lack of output schema, the description covers purpose, input, output, and important edge cases (normalization, empty labels). It's complete for effective use.

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% with a detailed description. The description adds context about normalization and empty label rejection, going beyond the schema. A score of 4 reflects this added value.

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 clearly states the tool computes EIP-137 namehash and labelhash of an ENS name. It uses a specific verb ('compute') and resource ('ENS name'), and the mention of EIP-137 distinguishes it from generic hash tools like 'hash' or 'eth_hash'.

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 explains the normalization prerequisite and rejection of empty labels, guiding correct usage. It could be more explicit about when not to use (e.g., for raw keccak256), but it's clear enough.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/laszlopere/mcp-bytesmith'

If you have feedback or need assistance with the MCP directory API, please join our Discord server