Skip to main content
Glama

purchase_name

Purchase an ENS name by registering available names or buying listed ones from marketplaces, with automatic detection and transaction details provided.

Instructions

Purchase an ENS name — either buy a listed name from a marketplace or register an available name directly on-chain.

For AVAILABLE names: Returns a complete registration recipe with contract address, ABI, step-by-step instructions, and a pre-generated secret. Your wallet signs and submits the transactions (commit → wait 60s → register).

For LISTED names: Searches all marketplaces (OpenSea, Grails) for the best price. If there are MULTIPLE active listings, returns CHOOSE_LISTING status with all options — present these to the user and ask which one they want. When the user chooses, call this tool again with the chosen orderHash to get the buy transaction.

The tool auto-detects whether the name is available or listed. You can override with the 'action' parameter.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameYesENS name to purchase (e.g. "coffee.eth")
actionNoAction: buy_listing (purchase listed name), register (register available name), auto (detect automatically)auto
durationNoRegistration duration in DAYS, for available names (ENS minimum 28, maximum 3650 = 10 years, default 365 = 1 year)
orderHashNoSpecific Seaport order hash to fulfill. Use this when the user has chosen a specific listing from multiple options.
maxPriceEthNoMaximum price willing to pay in ETH (for listed names)
durationYearsNoDEPRECATED — use duration (days) instead. Years are converted to days on the backend.
walletAddressYesBuyer wallet address (will own the name)
Behavior4/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure, and it does so well. It reveals that for available names it returns a registration recipe with contract address, ABI, instructions, and a pre-generated secret, and that the wallet signs/submits transactions with a commit-wait-register flow. It also explains the marketplace search behavior and the CHOOSE_LISTING status for multiple listings. Some gaps remain (e.g., costs, failure modes, exact return JSON), but it is notably transparent about its high-level behavior.

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?

The description is moderately long but well-organized into sections for available and listed names, making it scannable. The opening sentence captures the core purpose immediately. Each paragraph adds necessary behavioral detail (registration recipe, marketplace search, multiple-listing handling). A few sentences could be tightened, but generally every sentence contributes useful information for a complex operation.

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?

Given the tool's complexity (7 parameters, no annotations, no output schema), the description is remarkably complete. It covers the two operational modes, the auto-detection behavior, the multi-listing workflow, the need to re-invoke with an orderHash, and action overriding. It stops short of describing the exact return object structure (e.g., fields of CHOOSE_LISTING status), which would be expected without an output schema, but it provides enough context for an agent to use the tool correctly in most scenarios.

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 the baseline is 3. The description adds value beyond the schema by explaining how the 'action' parameter allows override, how 'orderHash' is used after a user selects from multiple listings, and that 'duration' is in days with a default of 365. It also clarifies the deprecated 'durationYears' is converted to days. This contextual information enhances the parameter semantics without merely repeating schema descriptions.

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 ('Purchase') and resource ('ENS name'), and clearly distinguishes two main modes: buying a listed name or registering an available name. It differentiates from sibling tools like bulk_register or accept_offer by explaining the auto-detection flow and marketplace search. The overall purpose is unambiguous and well-scoped.

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?

The description provides clear context on when to use the tool: for purchasing an ENS name, either via marketplace listing or direct registration. It explains the two distinct paths and how to handle multiple listings (calling again with orderHash). While it doesn't explicitly name alternative tools (e.g., 'for bulk registration use bulk_register'), it gives enough context for an agent to decide when this tool is appropriate, and even mentions overrides via the 'action' parameter.

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/eggybug42069/namewhisper-mcp'

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