Skip to main content
Glama

whois_tld

Retrieve WHOIS information for Top Level Domains (TLDs) to check registration details, ownership, and availability status directly within AI workflows.

Instructions

Looksup whois information about the Top Level Domain (TLD)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
tldYes

Implementation Reference

  • The async handler function that executes the core logic of the 'whois_tld' tool: invokes the whoisTld helper, formats the result as MCP text content, or returns an error response.
    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 for the 'whois_tld' tool.
    { tld: z.string().min(1) },
  • src/index.ts:31-50 (registration)
    The server.tool() call that registers the 'whois_tld' tool with the MCP server, specifying name, description, schema, and handler.
    //TOOL: TLD whois lookup 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/modelcontextprotocol-servers/whois-mcp'

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