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