Skip to main content
Glama

masscan_scan

Scan large IP ranges to uncover open ports using Masscan's high-speed scanning. Returns structured results per host.

Instructions

Scan a network range for open ports at high speed using Masscan.

Masscan is significantly faster than Nmap for large networks but produces less detailed results (no service detection). Ideal for initial port discovery across large IP ranges.

Args: target: IP address, hostname, or CIDR range (e.g. "192.168.1.0/24"). ports: Port specification (e.g. "80", "22-443", "22,80,443"). rate: Packets per second. Keep low (< 10000) for stealth. Warning: High rates may trigger IDS/IPS alerts or crash routers. timeout: Override default scan timeout in seconds.

Returns: Structured results with discovered open ports per host.

Note: - Masscan requires root/sudo privileges to send raw packets. - Use lower rates (100-1000) for stability and stealth. - Target must be in tengu.toml [targets].allowed_hosts.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
rateNo
portsNo1-1024
targetYes
timeoutNo

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, the description carries full responsibility. It discloses high-rate risks ('may trigger IDS/IPS alerts or crash routers'), root requirement, allowed_hosts constraint, and the lack of service detection. These go well beyond the input schema and prepare the agent for real-world consequences.

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 organized with clear sections (description, Args, Returns, Notes) and every sentence adds value: trade-offs, parameter examples, warnings, and prerequisites. It is appropriately detailed for a security tool with four parameters and significant operational caveats, with no redundancy.

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?

For a tool requiring root, sending raw packets, and running against potentially large networks, the description covers prerequisites (root, allowed_hosts), behavior limitations (no service detection), safety (rate guidance), and return format. It leaves no critical gap given the complexity and absent schema descriptions.

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?

Input schema has 0% description coverage, so the Args section compensates fully. It explains target with an example CIDR, ports with formats, rate with warning guidance, and timeout as an override. This adds semantic meaning beyond raw JSON types, directly addressing each parameter.

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 opens with a specific verb+resource: 'Scan a network range for open ports at high speed using Masscan.' It explicitly distinguishes from Nmap via 'significantly faster ... but produces less detailed results (no service detection)', which differentiates it from the sibling nmap_scan tool.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Provides clear guidance: 'Ideal for initial port discovery across large IP ranges' and notes the trade-off vs Nmap. It also includes prerequisites like root/sudo, target whitelist in tengu.toml, and rate recommendations for stealth, giving both when-to-use and operational conditions.

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