Skip to main content
Glama

whois_as

Retrieve WHOIS information for Autonomous System Numbers (ASNs) to identify network ownership and registration details.

Instructions

Looksup whois information about the Autonomous System Number (ASN)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
asnYes

Implementation Reference

  • Handler function for the 'whois_as' MCP tool that performs whois lookup for an ASN by calling whoisAsn(asn) and formatting the result as 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 for the 'whois_as' tool using Zod to validate and parse the ASN parameter.
    { 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 on the MCP server using server.tool() with name, description, 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
          };
        }
      }
    );
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full burden of behavioral disclosure. It mentions the action ('looksup') but doesn't describe what the lookup entails (e.g., data sources, rate limits, authentication needs, or response format). For a lookup tool with zero annotation coverage, this leaves significant gaps in understanding its behavior.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence that directly states the tool's purpose without unnecessary words. It is appropriately sized and front-loaded, making it easy to parse quickly.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's complexity (a lookup operation), lack of annotations, and no output schema, the description is incomplete. It doesn't cover behavioral aspects like data sources, error handling, or return values, which are crucial for an agent to use the tool effectively in context.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The schema description coverage is 0%, but the description adds minimal value by implying the parameter is an ASN. However, it doesn't explain the ASN format (e.g., 'AS12345') or provide examples, which the schema's pattern does. With one parameter and low coverage, the description partially compensates but not fully.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the action ('looksup') and resource ('whois information about the Autonomous System Number (ASN)'), making the tool's function immediately understandable. However, it doesn't explicitly differentiate from sibling tools like whois_domain, whois_ip, and whois_tld, which would require mentioning it specifically handles ASNs rather than domains, IPs, or TLDs.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus its siblings (whois_domain, whois_ip, whois_tld), nor does it mention any prerequisites, exclusions, or alternative contexts. It simply states what the tool does without indicating appropriate usage scenarios.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other 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