Skip to main content
Glama
cfenzo
by cfenzo

list_tlds

Lists available top-level domain categories and their contents to help users explore TLD options for domain registration.

Instructions

List available TLD categories and their contents.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
categoryNoCategory to list. Default: all

Implementation Reference

  • The handler function that executes the list_tlds tool logic, accepting a category argument and returning the appropriate TLD lists (general, tech, country, or all).
    case "list_tlds": { const category = (args?.category as string) || "all"; let result: Record<string, string[]>; switch (category) { case "general": result = { general: POPULAR_TLDS }; break; case "tech": result = { tech: TECH_TLDS }; break; case "country": result = { country: COUNTRY_TLDS }; break; case "all": default: result = { general: POPULAR_TLDS, tech: TECH_TLDS, country: COUNTRY_TLDS, }; } return { content: [ { type: "text", text: JSON.stringify(result, null, 2), }, ], }; }
  • The tool schema definition that defines the input parameters for list_tlds, including the category enum (general, tech, country, all).
    { name: "list_tlds", description: "List available TLD categories and their contents.", inputSchema: { type: "object" as const, properties: { category: { type: "string", enum: ["general", "tech", "country", "all"], description: "Category to list. Default: all", }, }, }, },
  • General TLD list constant used by list_tlds handler for the 'general' category.
    export const POPULAR_TLDS = [ "com", "net", "org", "io", "co", "dev", "app", "ai", "xyz", "me", "info", "biz", "tech", "online", "site", "cloud", ];
  • Country-code TLD list constant used by list_tlds handler for the 'country' category.
    export const COUNTRY_TLDS = [ "uk", "de", "fr", "nl", "es", "it", "pl", "ru", "jp", "cn", "au", "ca", "us", "in", "br", ];
  • Tech-focused TLD list constant used by list_tlds handler for the 'tech' category.
    export const TECH_TLDS = [ "io", "dev", "app", "ai", "tech", "cloud", "software", "systems", "digital", "code", ];

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