Skip to main content
Glama

whois_domain

Retrieve domain registration details including ownership, registration dates, and availability status by performing a WHOIS lookup, eliminating the need for manual browser searches.

Instructions

Looksup whois information about the domain

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
domainYes

Implementation Reference

  • src/index.ts:11-29 (registration)
    Registration of the 'whois_domain' tool, including schema validation with Zod ({ domain: z.string().min(1) }), and the handler function that performs a WHOIS domain lookup using whoisDomain from 'whoiser' library, formats the result as text content, and handles errors.
    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 }; } } );
  • The handler function for the whois_domain tool. It takes a domain parameter, calls whoisDomain(domain), returns the result as formatted text content, or an error response if the call fails.
    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 }; } }
  • Input schema for the whois_domain tool using Zod: requires a non-empty string 'domain'.
    { domain: z.string().min(1) },

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/modelcontextprotocol-servers/whois-mcp'

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