Skip to main content
Glama

whois_as

Retrieve WHOIS information for an Autonomous System Number (ASN) to identify ownership, registration details, and related network data efficiently.

Instructions

Looksup whois information about the Autonomous System Number (ASN)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
asnYes

Implementation Reference

  • Handler function that performs the ASN whois lookup using the imported whoisAsn function, handles errors, and returns formatted text content.
    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 }; } }
  • Input schema validating ASN as string matching /^AS\d+$/i pattern and transforming to integer by parsing the number after 'AS'.
    { asn: z.string().regex(/^AS\d+$/i).transform(s => parseInt(s.slice(2))) },
  • src/index.ts:74-92 (registration)
    Registers the 'whois_as' tool on the MCP server with name, description, input schema, and handler function.
    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/bharathvaj-ganesan/whois-mcp'

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