whois_domain
Retrieve domain registration details including ownership, registration dates, and availability status through WHOIS lookups.
Instructions
Looksup whois information about the domain
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| domain | Yes |
Implementation Reference
- src/index.ts:11-29 (registration)Registers the 'whois_domain' MCP tool with description, Zod input schema {domain: z.string().min(1)}, and an async handler that calls whoisDomain(domain) from 'whoiser' package, formats the result as text content or error.server.tool( 'whois_domain', 'Looksup whois information about the domain', { domain: z.string().min(1) }, async ({ domain }) => { try { const result = await whoisDomain(domain); return { content: [{ type: 'text', text: `Domain 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:15-28 (handler)The handler function for the whois_domain tool. It performs a WHOIS lookup using the external whoisDomain function and returns the result as structured text content or an error response.async ({ domain }) => { try { const result = await whoisDomain(domain); return { content: [{ type: 'text', text: `Domain 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:14-14 (schema)Input schema for the whois_domain tool using Zod: requires a non-empty string 'domain'.{ domain: z.string().min(1) },