Skip to main content
Glama
badchars

osint-mcp-server

by badchars

hackertarget_hostsearch

Discover subdomains and their IP addresses for any domain using HackerTarget's API to map attack surfaces and identify potential security risks.

Instructions

Find subdomains and their IPs for a domain via HackerTarget. Free tier: 50 queries/day.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
domainYesDomain to search hosts for

Implementation Reference

  • The core implementation of the host search logic, which fetches data from the HackerTarget API and parses the resulting CSV output.
    export async function hackertargetHostsearch(domain: string): Promise<HostEntry[]> {
      const text = await htFetch("hostsearch", domain);
      if (!text) return [];
    
      return text.split("\n").filter(Boolean).map((line) => {
        const [hostname, ip] = line.split(",");
        return { hostname: hostname?.trim() ?? "", ip: ip?.trim() ?? "" };
      });
    }
  • Registration of the tool, defining its name, schema, and linking the execution to the implementation function.
    const hackertargetHostsearchTool: ToolDef = {
      name: "hackertarget_hostsearch",
      description: "Find subdomains and their IPs for a domain via HackerTarget. Free tier: 50 queries/day.",
      schema: {
        domain: z.string().describe("Domain to search hosts for"),
      },
      execute: async (args) => json(await hackertargetHostsearch(args.domain as string)),
    };
Behavior3/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It adds useful context about the free tier limit (50 queries/day), which is a rate limit not covered elsewhere. However, it lacks details on response format, error handling, or other behavioral traits like whether it's a read-only operation or requires authentication.

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 highly concise and front-loaded, consisting of two sentences that efficiently convey the tool's purpose and a key limitation. Every sentence adds value without waste, making it easy to understand quickly.

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 the tool's moderate complexity (a single-parameter query tool with no output schema and no annotations), the description is somewhat complete but has gaps. It covers the purpose and a rate limit, but lacks details on output format, error cases, or how it compares to siblings. This is adequate but not fully comprehensive for an agent to use it effectively without trial.

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 has 100% description coverage, with the 'domain' parameter clearly documented. The description does not add any additional semantic details about the parameter beyond what the schema provides, such as format examples or constraints. The baseline score of 3 is appropriate since the schema adequately covers the parameter.

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 tool's purpose: 'Find subdomains and their IPs for a domain via HackerTarget.' It specifies the action (find), resource (subdomains and IPs), and target (domain), but does not explicitly differentiate it from sibling tools like 'st_subdomains' or 'vt_subdomains' that may offer similar functionality.

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 implied usage context by mentioning 'Free tier: 50 queries/day,' which suggests when to use it (for limited queries) and hints at limitations. However, it does not explicitly state when to choose this tool over alternatives like other subdomain tools in the sibling list, nor does it provide exclusions or prerequisites.

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