Skip to main content
Glama
badchars

osint-mcp-server

by badchars

hackertarget_reverseip

Discover all domains hosted on an IP address using reverse IP lookup.

Instructions

Reverse IP lookup via HackerTarget — find all domains hosted on an IP. Free tier: 50 queries/day.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
ipYesIP address for reverse lookup

Implementation Reference

  • The actual implementation of hackertargetReverseIp — calls htFetch with 'reverseiplookup' endpoint, parses newline-separated results into an array of domain strings.
    export async function hackertargetReverseIp(ip: string): Promise<string[]> {
      const text = await htFetch("reverseiplookup", ip);
      if (!text) return [];
      return text.split("\n").filter(Boolean).map((l) => l.trim());
    }
  • Shared HTTP helper htFetch used by all HackerTarget functions — handles rate limiting via RateLimiter, calls the HackerTarget API, and checks for error responses.
    async function htFetch(endpoint: string, query: string): Promise<string> {
      await limiter.acquire();
      const res = await fetch(`https://api.hackertarget.com/${endpoint}/?q=${encodeURIComponent(query)}`);
      if (!res.ok) throw new Error(`HackerTarget returned ${res.status}`);
      const text = await res.text();
      if (text.startsWith("error")) throw new Error(`HackerTarget: ${text}`);
      if (text.includes("API count exceeded")) throw new Error("HackerTarget daily API limit exceeded (50/day free tier)");
      return text.trim();
    }
  • ToolDef registration of hackertarget_reverseip with name, description, zod schema (ip: string), and execute handler.
    const hackertargetReverseIpTool: ToolDef = {
      name: "hackertarget_reverseip",
      description: "Reverse IP lookup via HackerTarget — find all domains hosted on an IP. Free tier: 50 queries/day.",
      schema: {
        ip: z.string().describe("IP address for reverse lookup"),
      },
      execute: async (args) => json(await hackertargetReverseIp(args.ip as string)),
    };
  • The hackertargetReverseIpTool is included in the tools array for registration.
    hackertargetReverseIpTool,
  • src/index.ts:33-33 (registration)
    The tool is listed in the HackerTarget provider group at the top-level index for UI display.
    { label: "HackerTarget", env: null, tools: ["hackertarget_hostsearch", "hackertarget_reverseip", "hackertarget_aslookup"] },

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.2.0

TDQS

A3.8/5.0
Behavior3/5

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

No annotations are present, so the description carries the full burden. It discloses a rate limit ('Free tier: 50 queries/day'), which is helpful. However, it does not state that the operation is read-only, or describe error handling or output format.

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 sentence that clearly states the purpose upfront, followed by a necessary constraint. No wasted words.

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

Completeness4/5

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

Given the simplicity of the tool (one required parameter, no output schema), the description is mostly complete but could mention the output format (list of domains) and any API nuances. Still, it is adequate for typical use.

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 input schema covers the single parameter 'ip' with a description. The tool description does not add additional parameter-specific meaning beyond what the schema provides. With 100% schema coverage, a baseline of 3 is appropriate.

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 tool's purpose: 'Reverse IP lookup via HackerTarget — find all domains hosted on an IP.' It uses a specific verb and resource, and the name 'reverseip' distinguishes it from siblings like dns_lookup or whois_domain.

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

Usage Guidelines3/5

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

The description does not explicitly state when to use this tool versus alternatives. Usage is implied by the name and context, but no guidance on when not to use it or specific scenarios is provided.

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