purchase_name
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
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | ENS name to purchase (e.g. "coffee.eth") | |
| action | No | Action: buy_listing (purchase listed name), register (register available name), auto (detect automatically) | auto |
| duration | No | Registration duration in days. ENS protocol minimum is 28 days; maximum is 3650 (10 years); default is 365 (1 year). Sub-year is allowed. | |
| orderHash | No | Specific Seaport order hash to fulfill. Use this when the user has chosen a specific listing from multiple options. | |
| maxPriceEth | No | Maximum price willing to pay in ETH (for listed names) | |
| durationYears | No | DEPRECATED — use duration (days) instead. Number of years (converted to days internally). | |
| walletAddress | Yes | Buyer wallet address (will own the name) |