Skip to main content
Glama

whois_as

Retrieve detailed WHOIS information on Autonomous System Numbers (ASN) to identify ownership, registration dates, and related network details. Input a valid ASN format (e.g., AS12345) for precise results.

Instructions

Looksup whois information about the Autonomous System Number (ASN)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
asnYes

Implementation Reference

  • The handler function for the 'whois_as' tool that executes the ASN WHOIS lookup by calling whoisAsn(asn) from the 'whoiser' library and returns formatted text response or error.
    async ({ asn }) => { try { const result = await whoisAsn(asn); return { content: [{ type: 'text', text: `ASN 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 }; } }
  • Zod input schema for the 'asn' parameter, validating format like 'AS123' and transforming to integer.
    { asn: z.string().regex(/^AS\d+$/i).transform(s => parseInt(s.slice(2))) },
  • src/index.ts:74-92 (registration)
    Registration of the 'whois_as' tool in the registerTools function using McpServer.tool method, specifying name, description, input schema, and handler.
    server.tool( 'whois_as', 'Looksup whois information about the Autonomous System Number (ASN)', { asn: z.string().regex(/^AS\d+$/i).transform(s => parseInt(s.slice(2))) }, async ({ asn }) => { try { const result = await whoisAsn(asn); return { content: [{ type: 'text', text: `ASN 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 }; } } );

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