Skip to main content
Glama

Run Nmap

run_nmap

Discover live hosts and scan open ports, service versions, OS details, and NSE vulnerabilities with configurable timing, scripts, and evasion.

Instructions

Nmap (Network Mapper) is a powerful tool for network discovery and security auditing. Tags: network, scanner, reconnaissance, security, pentest, enumeration, discovery

Usage Guide:

  • Host Discovery: Use mode="ping" for a fast ICMP/TCP scan to find live hosts, or mode="list" to resolve DNS names without sending packets.

  • Port Scanning: Default mode is "syn" (Stealth SYN scan). Use mode="udp" for UDP services.

  • Enumeration: Set service_version=True for version detection (adjust version_intensity 0-9) or os_detection=True for OS fingerprinting.

  • Aggressive Mode: Set aggressive=True to enable OS detection, version detection, script scanning, and traceroute simultaneously.

  • Scripting (NSE): Use the scripts parameter to run "default", "vuln" (vulnerability checks), or "brute" (password guessing).

  • Evasion: Use timing (0-5) to control speed/stealth, fragment=True to split packets, and decoys="IP1,IP2,ME" to mask your source.

  • Output: Use output_name to save results in normal, XML, and grepable formats.

Warnings: This tool contains functionality for brute-forcing and security exploitation.

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": {
      "target": "<target>"
    },
    "name": "run_nmap"
  }
}

Input Schema

NameRequiredDescriptionDefault
modeNoScan technique: "syn" (default), "udp", "ping" (host discovery), "list" (DNS resolution only).syn
portsNoSpecific ports or ranges (e.g., "80,443", "1-65535").
decoysNoComma-separated list of decoy IP addresses to hide your identity.
targetYesTarget IP address, hostname, or network range (e.g., 192.168.1.1, 10.0.0.0/24).
timingNoTiming template (0-5) for speed/evasion. 4 is fast, 3 is default.
scriptsNoNSE script categories to run (e.g., "default", "vuln", "brute").
fragmentNoUse tiny fragmented IP packets to bypass some firewalls.
aggressiveNoEnables -A (OS detection, version detection, script scanning, and traceroute).
output_nameNoBase filename to save results in all formats (.nmap, .xml, .gnmap).
os_detectionNoAttempts to identify the target's operating system.
service_versionNoProbes open ports to determine service/version info.
version_intensityNoLevel of version detection (0-9). Default is 5.

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.9/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 it does substantial work: it discloses that aggressive mode bundles OS/version/script/traceroute, that timing trades speed against stealth, that decoys and fragmentation mask the source, that output is written to disk in three formats, and it warns that brute-forcing and exploitation functionality is present. It does not mention privilege requirements (raw sockets/root for SYN scans) or that scans may trip IDS, which are relevant for a tool this intrusive.

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 bulleted Usage Guide is front-loaded by task (discovery, port scan, enumeration, scripting, evasion, output) and is easy to scan, and the Warnings section is placed last where it belongs. The opening marketing sentence and the raw Tags line are filler that do not help an agent decide or invoke correctly.

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, high-complexity security tool, the description covers mode selection, intensity knobs, evasion, and output persistence, and an output schema exists so return values need not be explained. The main residual gap is operational preconditions, namely privileges needed for raw-packet modes and the fact that scans are detectable and should only target authorized hosts.

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 all 12 parameters, and much of the description restates them (timing 0-5, version_intensity 0-9, decoys format, output formats). It adds modest extra meaning, such as calling "syn" a stealth scan and expanding the NSE categories vuln= vulnerability checks and brute= password guessing, which puts it slightly above the baseline rather than clearly beyond it.

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 names the tool (Nmap) and states its domain, network discovery and security auditing, then enumerates concrete capabilities: host discovery, port scanning, enumeration, NSE scripting, evasion, and output. This lets an agent distinguish its role from siblings like run_amass or run_nuclei, though it never explicitly contrasts itself with the closest sibling port scanners such as run_masscan.

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 mode-selection rules (mode="ping" for fast live-host discovery, mode="list" for DNS-only resolution, default "syn" for stealth port scanning, mode="udp" for UDP services) and conditions for enabling service_version, os_detection, and aggressive. It lacks any statement of when NOT to use this tool or which sibling scanner to prefer instead.

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