Skip to main content
Glama

whois_tld

Perform WHOIS lookups for Top Level Domains (TLDs) to retrieve registration details, ownership information, and domain availability directly through the Whois MCP server.

Instructions

Looksup whois information about the Top Level Domain (TLD)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
tldYes

Implementation Reference

  • The async handler function that implements the core logic of the 'whois_tld' tool: invokes whoisTld(tld), serializes the result or error message into an MCP-compatible response format.
    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 input schema for the 'whois_tld' tool, validating the 'tld' parameter as a non-empty string.
    try {
  • src/index.ts:34-52 (registration)
    MCP server.tool registration for the 'whois_tld' tool, specifying name, description, schema, and handler function.
    '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 }; } } ); //TOOL: IP whois lookup
  • Import statement bringing in the external 'whoisTld' utility function used by the tool handler.
    import { whoisAsn, whoisDomain, whoisTld, whoisIp } from 'whoiser';

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

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