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
| Name | Required | Description | Default |
|---|---|---|---|
| tld | Yes |
Implementation Reference
- src/index.ts:36-49 (handler)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 }; } }
- src/index.ts:35-35 (schema)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 }; } } );