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"] },
Behavior3/5

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

No annotations are present, so the description must cover behavioral traits. It discloses a rate limit ('Free tier: 50 queries/day'), which is helpful, but does not mention whether the operation is read-only, requires authentication, or other side effects.

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 two sentences with no extraneous information. It is front-loaded with the core purpose and immediately follows with the key usage constraint.

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?

No output schema exists, and the description only states the result will be 'domains hosted on an IP', lacking details on format or structure. For a simple tool, this may be sufficient but leaves some ambiguity.

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?

With 100% schema coverage, the description adds no extra meaning to the single 'ip' parameter beyond what the schema already provides. Baseline 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 'Reverse IP lookup via HackerTarget — find all domains hosted on an IP.' This uses a specific verb and resource, and distinguishes from siblings like dns_reverse which does PTR records.

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 provides a usage limit ('Free tier: 50 queries/day') but lacks explicit guidance on when to use this tool versus alternatives. It does not mention prerequisites or exclusions.

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