Skip to main content
Glama

Run Theharvester

run_theharvester

Gather subdomains, email addresses, and open ports from public sources for a target domain. Supports DNS brute-forcing, virtual host detection, and takeover checks.

Instructions

theHarvester is a tool for gathering subdomain names, e-mail addresses, virtual hosts, open ports/ banners, and employee names from different public sources. Tags: osint, reconnaissance, security, pentest, enumeration, subdomains, email-harvesting

Usage Guide:

  • Basic Reconnaissance: Provide a domain to collect emails and subdomains. Use source (default "all") to query search engines and public databases.

  • Performance Tuning: Use limit to restrict the number of search results to avoid rate-limiting.

  • Advanced Enumeration: Enable dns_brute (-c) for wordlist-based subdomain guessing or vhost (-v) to identify virtual hosts on discovered IPs.

  • Infrastructure Analysis: Enable shodan (-s) to query port and service data (requires API key setup).

  • API & Takeovers: Use api_scan (-a) with a wordlist to find hidden endpoints, and takeover_check (-t) to detect subdomains pointing to unclaimed cloud services.

  • Output: Save findings using filename or capture visual evidence of active sites with screenshot_dir.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "domain": "<domain>"
    },
    "name": "run_theharvester"
  }
}

Input Schema

NameRequiredDescriptionDefault
limitNoLimit the number of search results (default 500).
vhostNoVerify hostnames via DNS and check for virtual hosts.
domainYesTarget domain to search (e.g., example.com).
shodanNoUse Shodan to query discovered hosts for open ports.
sourceNoData source to query (e.g., google, bing, crtsh, shodan, or "all").all
api_scanNoScan for API endpoints using a wordlist.
filenameNoSave results to XML and JSON files (provide base name).
wordlistNoPath to a custom wordlist for API or enumeration.
dns_bruteNoPerform DNS brute-force enumeration.
resolver_listNoPath to a file containing custom DNS resolvers.
screenshot_dirNoDirectory to save screenshots of resolved web properties.
takeover_checkNoCheck discovered subdomains for potential takeover vulnerabilities.

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4/5.0
Behavior4/5

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

With no annotations supplied, the description carries the full burden and does add real behavioral context: it discloses that `shodan` requires API key setup, that `limit` guards against rate-limiting, and that `filename`/`screenshot_dir` write artifacts to disk. It stops short of stating that the tool issues active outbound requests, expected runtime, or whether results are read-only versus stateful, which leaves some risk unstated for a 12-parameter recon tool.

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

Conciseness4/5

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

The purpose statement is front-loaded, and the bulleted Usage Guide is scannable and groups flags by scenario rather than listing them flatly. The keyword tag line is mild filler but aids retrieval and costs only one line.

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?

For a 12-parameter tool with an output schema, the description covers nearly every flag's intent plus prerequisites and side effects, so an agent can construct a sensible invocation without guessing. The only gaps are the unmentioned `resolver_list` and the absence of any statement about expected duration or request volume.

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

Parameters4/5

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

Schema coverage is already 100%, so the baseline is 3, but the description adds genuine meaning beyond the schema: it qualifies `source` as querying search engines and public databases, explains `dns_brute` as wordlist-based subdomain guessing, ties `vhost` to discovered IPs, and notes the Shodan API key prerequisite. Only `resolver_list` receives no elaboration in the description.

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 opening sentence names a specific tool and enumerates concrete resources it collects (subdomains, e-mail addresses, virtual hosts, open ports, employee names) from public sources, so the agent knows exactly what capability this provides. It does not differentiate itself from overlapping siblings such as run_subfinder or run_amass, leaving the agent to infer which recon tool to pick.

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?

The Usage Guide gives explicit when-to-use guidance for each mode: basic recon with `domain`/`source`, performance tuning with `limit` to avoid rate-limiting, advanced enumeration with `dns_brute`/`vhost`, infrastructure analysis with `shodan`, and API/takeover scanning with `api_scan`/`takeover_check`. What is missing is any when-not guidance or naming of the sibling recon tools this should be preferred over.

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