Skip to main content
Glama
cfenzo
by cfenzo

check_alternative_tlds

Check domain availability across multiple TLDs to find available alternatives when your preferred domain is already taken.

Instructions

Check domain availability across multiple TLDs. Useful for finding available alternatives when the primary TLD is taken.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameYesThe domain name without TLD (e.g., 'example')
tldsNoList of TLDs to check. If not provided, checks popular TLDs.
categoryNoCategory of TLDs to check if 'tlds' not provided. Default: general

Implementation Reference

  • MCP tool handler for 'check_alternative_tlds' - processes input arguments, calls the implementation function, and formats the response by separating available and taken domains into a structured summary.
    case "check_alternative_tlds": {
      const domainName = args?.name as string;
      if (!domainName) {
        throw new Error("Domain name is required");
      }
    
      let tlds: string[];
      if (args?.tlds && Array.isArray(args.tlds)) {
        tlds = args.tlds as string[];
      } else {
        const category = (args?.category as string) || "general";
        tlds = getSuggestedTlds(category as "general" | "tech" | "country" | "all");
      }
    
      const results = await checkAlternativeTlds(domainName, tlds);
    
      // Separate available and taken
      const available = results.results.filter((r) => r.available);
      const taken = results.results.filter((r) => !r.available);
    
      const summary = {
        originalDomain: results.originalDomain,
        totalChecked: results.results.length,
        availableCount: available.length,
        takenCount: taken.length,
        available,
        taken,
      };
    
      return {
        content: [
          {
            type: "text",
            text: JSON.stringify(summary, null, 2),
          },
        ],
      };
    }
  • Core implementation of checkAlternativeTlds function - checks domain availability across multiple TLDs using batch processing with configurable concurrency and delay to avoid rate limits.
    export async function checkAlternativeTlds(
      domainName: string,
      tlds: string[] = POPULAR_TLDS,
      options: { concurrency?: number; batchDelay?: number } = {}
    ): Promise<AlternativeTldResult> {
      const { concurrency = DEFAULT_CONCURRENCY, batchDelay = BATCH_DELAY_MS } = options;
      const name = domainName.includes(".") ? parseDomain(domainName).name : domainName;
    
      const results: DomainCheckResult[] = [];
    
      // Process in batches to avoid overwhelming servers
      for (let i = 0; i < tlds.length; i += concurrency) {
        const batch = tlds.slice(i, i + concurrency);
        const batchResults = await Promise.all(
          batch.map((tld) => checkDomain(`${name}.${tld}`))
        );
        results.push(...batchResults);
    
        // Add delay between batches (except after the last batch)
        if (i + concurrency < tlds.length) {
          await sleep(batchDelay);
        }
      }
    
      return {
        originalDomain: name,
        results,
      };
    }
  • src/index.ts:38-64 (registration)
    Tool registration for 'check_alternative_tlds' - defines the input schema with parameters for name, tlds array, and category enum, with descriptions for each field.
    {
      name: "check_alternative_tlds",
      description:
        "Check domain availability across multiple TLDs. Useful for finding available alternatives when the primary TLD is taken.",
      inputSchema: {
        type: "object" as const,
        properties: {
          name: {
            type: "string",
            description: "The domain name without TLD (e.g., 'example')",
          },
          tlds: {
            type: "array",
            items: { type: "string" },
            description:
              "List of TLDs to check. If not provided, checks popular TLDs.",
          },
          category: {
            type: "string",
            enum: ["general", "tech", "country", "all"],
            description:
              "Category of TLDs to check if 'tlds' not provided. Default: general",
          },
        },
        required: ["name"],
      },
    },
  • Type definitions for AlternativeTldResult and DomainCheckResult interfaces - defines the structure for domain check results including domain, tld, availability status, method, confidence, and optional details/errors.
    export interface DomainCheckResult {
      domain: string;
      tld: string;
      available: boolean;
      method: "dns" | "whois" | "both";
      confidence: "high" | "medium" | "low";
      details?: string;
      error?: string;
    }
    
    export interface AlternativeTldResult {
      originalDomain: string;
      results: DomainCheckResult[];
    }
  • Helper function getSuggestedTlds - returns appropriate TLD lists based on category (general, tech, country, all), used by the handler to determine which TLDs to check when not explicitly provided.
    export function getSuggestedTlds(
      purpose: "general" | "tech" | "country" | "all" = "general"
    ): string[] {
      switch (purpose) {
        case "tech":
          return TECH_TLDS;
        case "country":
          return COUNTRY_TLDS;
        case "all":
          return [...new Set([...POPULAR_TLDS, ...TECH_TLDS, ...COUNTRY_TLDS])];
        case "general":
        default:
          return POPULAR_TLDS;
      }
    }
Behavior2/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. While it mentions the tool checks availability, it doesn't describe what happens during execution (e.g., whether it makes external API calls, has rate limits, requires authentication, or returns structured data). For a tool that likely queries external services, this lack of behavioral context is a significant gap.

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 perfectly concise with just two sentences that each earn their place. The first sentence states the core functionality, and the second provides valuable usage context. There's no wasted language, and information is front-loaded effectively.

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?

Given the tool's moderate complexity (3 parameters, no output schema, no annotations), the description is adequate but incomplete. It explains the purpose and usage context well, but lacks details about behavioral traits (e.g., execution characteristics) and output format. Without annotations or an output schema, the agent has insufficient information about what the tool returns or how it behaves operationally.

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?

The description adds no parameter-specific information beyond what's already in the input schema, which has 100% description coverage. The schema fully documents all three parameters (name, tlds, category) with clear descriptions and an enum for category. Since the schema does the heavy lifting, the baseline score of 3 is appropriate, as the description doesn't compensate with additional semantic context.

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's purpose with a specific verb ('Check domain availability') and resource ('across multiple TLDs'). It distinguishes from sibling tools by focusing on TLD alternatives rather than single-domain checking (check_domain), listing TLDs (list_tlds), or suggesting domain names (suggest_domains). The phrase 'when the primary TLD is taken' further clarifies the specific use case.

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 for when to use this tool ('Useful for finding available alternatives when the primary TLD is taken'), which implicitly suggests it's an alternative to check_domain when that tool indicates unavailability. However, it doesn't explicitly state when NOT to use it or name specific alternatives among the siblings, keeping it from a perfect score.

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/cfenzo/domain-mcp'

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