Skip to main content
Glama

whois_tld

Look up WHOIS information for Top Level Domains (TLDs) to check availability, registration details, and ownership data.

Instructions

Looksup whois information about the Top Level Domain (TLD)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
tldYes

Implementation Reference

  • The handler function that performs the whoisTld lookup for the given TLD, formats the result as text content, and handles errors appropriately.
    async ({ tld }) => { try { const result = await whoisTld(tld); return { content: [{ type: 'text', text: `TLD whois lookup for: \n${JSON.stringify(result)}` }], }; } catch (err: unknown) { const error = err as Error; return { content: [{ type: 'text', text: `Error: ${error.message}` }], isError: true }; } }
  • Zod schema defining the input parameter 'tld' as a non-empty string.
    { tld: z.string().min(1) },
  • src/index.ts:32-50 (registration)
    Registers the 'whois_tld' tool on the MCP server with its name, description, input schema, and handler function.
    server.tool( 'whois_tld', 'Looksup whois information about the Top Level Domain (TLD)', { tld: z.string().min(1) }, async ({ tld }) => { try { const result = await whoisTld(tld); return { content: [{ type: 'text', text: `TLD whois lookup for: \n${JSON.stringify(result)}` }], }; } catch (err: unknown) { const error = err as Error; return { content: [{ type: 'text', text: `Error: ${error.message}` }], isError: true }; } } );

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/bharathvaj-ganesan/whois-mcp'

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