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
| Name | Required | Description | Default |
|---|---|---|---|
| tld | Yes |
Implementation Reference
- src/index.ts:38-51 (handler)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 }; } } );
- src/index.ts:37-37 (schema)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
- src/index.ts:6-6 (helper)Import statement bringing in the external 'whoisTld' utility function used by the tool handler.import { whoisAsn, whoisDomain, whoisTld, whoisIp } from 'whoiser';