Skip to main content
Glama
badchars

osint-mcp-server

by badchars

hackertarget_aslookup

Look up ASN information for IP addresses or AS numbers to identify network ownership and routing data using HackerTarget's database.

Instructions

Look up ASN information for an IP or ASN via HackerTarget. Free tier: 50 queries/day.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
queryYesIP address or ASN to look up

Implementation Reference

  • The implementation of the hackertargetAslookup function, which handles the tool's core logic by querying the HackerTarget API and processing the returned text.
    export async function hackertargetAslookup(query: string): Promise<AslookupResult> {
      const text = await htFetch("aslookup", query);
      const lines = text.split("\n").filter(Boolean);
      const entries: AslookupResult["entries"] = [];
    
      for (const line of lines) {
        const parts = line.split(",").map((p) => p.trim().replace(/^"|"$/g, ""));
        if (parts.length >= 3) {
          entries.push({ asn: parts[0], ip: parts[1], owner: parts[2] });
        }
      }
    
      return { query, raw: text, entries };
    }
  • The registration of the 'hackertarget_aslookup' tool in the protocol layer, defining its schema, description, and execution logic.
    const hackertargetAslookupTool: ToolDef = {
      name: "hackertarget_aslookup",
      description: "Look up ASN information for an IP or ASN via HackerTarget. Free tier: 50 queries/day.",
      schema: {
        query: z.string().describe("IP address or ASN to look up"),
      },
      execute: async (args) => json(await hackertargetAslookup(args.query as string)),
    };
  • The type definition for the AslookupResult, which specifies the structure of the tool's output.
    interface AslookupResult {
      query: string;
      raw: string;
      entries: { asn: string; ip: string; owner: string }[];
    }
Behavior3/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. It discloses the free tier rate limit (50 queries/day), which is valuable behavioral context. However, it lacks details on error handling, response format, or authentication needs, leaving gaps in transparency for a tool with no structured annotations.

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 front-loads the purpose and includes essential usage context (free tier limit). Every word earns its place, with no redundancy or unnecessary elaboration.

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

Completeness3/5

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

Given no annotations and no output schema, the description provides basic purpose and rate limit info but lacks details on return values, error cases, or deeper behavioral traits. For a tool with one parameter and moderate complexity, it is minimally adequate but has clear gaps in completeness.

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?

Schema description coverage is 100%, so the schema already documents the 'query' parameter as 'IP address or ASN to look up'. The description does not add any further meaning beyond this, such as format examples or constraints, resulting in a baseline score of 3.

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

Purpose5/5

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

The description clearly states the verb ('Look up') and resource ('ASN information for an IP or ASN'), specifying the service provider ('via HackerTarget'). It distinguishes from siblings like 'bgp_asn' or 'bgp_ip' by mentioning the specific data source and free tier context.

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

Usage Guidelines4/5

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

It provides clear context for when to use this tool (ASN lookups via HackerTarget) and mentions the free tier limit, which helps in usage decisions. However, it does not explicitly state when not to use it or name alternatives among siblings, such as 'bgp_asn' for BGP-specific ASN data.

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/badchars/osint-mcp-server'

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