Skip to main content
Glama

nmap_scan

Scan a target to discover open ports, running services, and software versions with Nmap, supporting custom scan types, timing profiles, OS detection, and NSE scripts.

Instructions

Scan a target for open ports, services, and versions using Nmap.

IMPORTANT: Available parameters are: target, ports, scan_type, timing, os_detection, scripts, timeout. There is NO 'flags' parameter — use scan_type for scan technique and scripts for NSE scripts.

Args: target: IP address, hostname, CIDR range, or URL to scan. ports: Port specification (e.g. "80", "22-443", "22,80,443", "1-65535"). scan_type: Scan technique — syn (stealthy), connect (no root), udp, version (service detection), ping (host discovery), fast (top 100). timing: Nmap timing template T0 (paranoid) to T5 (insane). Default: T3. os_detection: Enable OS fingerprinting (-O). Requires root/sudo. scripts: Comma-separated nmap script names (e.g. "http-title,ssl-cert"). timeout: Override default scan timeout in seconds.

Returns: Structured scan results with hosts, ports, services, and raw nmap output.

Note: - SYN scan (-sS) requires root/sudo privileges. - OS detection (-O) requires root/sudo privileges. - Target must be in tengu.toml [targets].allowed_hosts.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
portsNo1-1024
targetYes
timingNoT3
scriptsNo
timeoutNo
scan_typeNoconnect
os_detectionNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Behavior5/5

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

With no annotations provided, the description fully carries the behavioral disclosure burden. It explicitly discloses that SYN scan requires root/sudo, OS detection requires root/sudo, and targets must be in the allowed_hosts list. It also explains the default scan type and the existence of a timeout parameter, giving the agent a clear picture of operational constraints and 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?

Despite being long, the description is well-structured with clear sections (IMPORTANT, Args, Returns, Note). Every sentence adds value: the no-flags warning prevents common mistakes, each parameter is explained concisely, and the notes about privileges and allowed_hosts are critical. No redundant fluff exists.

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

Completeness5/5

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

Given the tool's complexity (7 parameters, output schema) and the absence of annotations, the description is exceptionally complete. It covers parameter semantics, return value summary, privilege prerequisites, and configuration constraints. The output schema exists but the description appropriately summarizes the return structure without over-explaining, and it includes all necessary operational context for correct invocation.

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

Parameters5/5

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

Schema description coverage is 0%, so the description is the sole source of parameter meaning. It explains every parameter (target, ports, scan_type, timing, os_detection, scripts, timeout) with concrete examples and details, such as scan_type values ('syn (stealthy), connect (no root)') and port formats. It also warns about the absence of a 'flags' parameter, preventing incorrect invocation.

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 'Scan a target for open ports, services, and versions using Nmap.' This is a specific verb+resource combination that distinguishes it from sibling scanners like masscan_scan and rustscan_scan by emphasizing Nmap's service/version detection, while also mentioning key parameters that define its scope.

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 implies usage context through its capability description (service/version detection) and notes privilege requirements, but it does not explicitly contrast with alternatives like masscan or rustscan. There is no 'when to use this instead of X' guidance, so the agent must infer when Nmap is the right choice over other scanner siblings.

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/rfunix/tengu'

If you have feedback or need assistance with the MCP directory API, please join our Discord server