Skip to main content
Glama

check-availability

Verify if an Ethereum Name Service (ENS) domain is available for registration by entering the desired name. Use this tool to confirm domain eligibility before proceeding.

Instructions

Check if an ENS name is available for registration

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameYesThe ENS name to check (without .eth suffix)

Implementation Reference

  • The core handler function that implements the logic for checking ENS name availability. It normalizes the name, uses publicClient.getAvailable to check status, fetches owner if taken, and returns formatted response or error.
    export async function checkAvailability( { name }: { name: string }): Promise<ServerResponse> {
        const normalizedName = normalizeName(name);
        try {
    
            
            const available = await publicClient.getAvailable({ name: normalizedName });
    
            if (available) {
                return {
                    content: [{ type: "text", text: `The name ${normalizedName} is available for registration.` }],
                    isError: false
                };
            } else {
                
                const owner = await publicClient.getOwner({ name: normalizedName });
    
                return {
                    content: [{
                        type: "text",
                        text: `The name ${normalizedName} is already registered. ` +
                            (owner ? `Current owner: ${owner.owner}` : "")
                    }],
                    isError: false
                };
            }
        } catch (error) {
            const errorMessage = handleEnsError(error, "name availability check");
    
            return {
                content: [{ type: "text", text: errorMessage }],
                isError: true
            };
        }
    }
  • index.ts:59-66 (registration)
    Registers the 'check-availability' tool with the MCP server, defining its name, description, input schema, and delegates execution to the checkAvailability function.
    server.tool(
        "check-availability",
        "Check if an ENS name is available for registration",
        {
            name: z.string().describe("The ENS name to check (without .eth suffix)"),
        },
        async (params) => checkAvailability( params)
    );
  • Input schema for the tool using Zod, specifying the 'name' parameter as a string.
    {
        name: z.string().describe("The ENS name to check (without .eth suffix)"),
    },
Behavior2/5

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

With no annotations provided, the description carries full burden but only states the basic purpose. It doesn't disclose behavioral traits like whether this is a read-only operation (implied but not stated), rate limits, authentication requirements, network dependencies, or what happens with invalid names. The description is minimal and lacks operational context.

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?

The description is a single, efficient sentence that directly states the tool's purpose with zero wasted words. It is appropriately sized for a simple query tool and front-loads the core functionality without unnecessary elaboration.

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 simple single-parameter query tool with no annotations and no output schema, the description is adequate but minimal. It covers the basic purpose but lacks context about return values (e.g., boolean availability status, error responses) or integration with sibling tools like 'get-registration-price'. Given the low complexity, it meets minimum viability.

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 description coverage is 100%, with the parameter 'name' clearly documented in the schema. The description adds no additional parameter semantics beyond what the schema provides (e.g., no examples, format clarifications, or edge cases). Baseline 3 is appropriate when the schema does the heavy lifting.

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 specific action ('Check if... is available') and resource ('an ENS name'), with the verb 'check' precisely indicating a query operation. It distinguishes from siblings like 'get-registration-price' (price calculation) and 'resolve-name' (address lookup) by focusing on availability status.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies usage when determining if an ENS name can be registered, but provides no explicit guidance on when to use this tool versus alternatives like 'get-registration-price' (which might be a logical next step) or 'resolve-name' (for existing names). No exclusions or prerequisites are mentioned.

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

Related 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/JustaName-id/ens-mcp-server'

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