Skip to main content
Glama

nmap_xml_scan

Run port scans with Nmap and get structured XML results containing hosts, ports, services, and OS guesses—ready for direct use in penetration testing without regex parsing.

Instructions

Port scan with XML output — returns fully structured host/port/service data. Unlike nmap_port_scan (raw text), this parses XML into structured dicts so findings, services, and OS guesses are immediately usable without regex. targets: IPs/ranges/hostnames (space-separated) ports: '1-65535', '22,80,443', or 'top100' scan_type: 'auto' (sS if root else sT), 'sS', 'sT' timing: T0-T5 service_detection: include -sV service version probing (default True) Returns: structured dict with hosts[], each containing ports[], services, os[]

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
portsNo1-1000
timingNoT4
targetsYes
scan_typeNoauto
service_detectionNo
Behavior4/5

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

With no annotations provided, the description carries the burden of disclosing behavior. It explains the scan_type auto logic (sS if root else sT), the default for service_detection, and the structured return format. However, it doesn't mention potential scan duration, network impact, or that OS guesses may not be produced by default unless OS detection is separately enabled, leaving some ambiguity.

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 well-structured, front-loaded with the main purpose, and each line serves a distinct purpose. The parameter list format is efficient and easy to parse, with no fluff or repetition of schema fields.

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?

The description covers the tool's purpose, usage parameters, and return structure, which is comprehensive for a complex tool with no output schema. However, there is slight ambiguity around OS guesses—it lists 'os[]' in the return but doesn't explain that OS detection may require additional nmap flags beyond service_detection, leaving a small gap in completeness.

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 fully compensates. It explains all five parameters: targets format (space-separated IPs/ranges/hostnames), ports examples ('1-65535', '22,80,443', 'top100'), scan_type options with auto logic, timing T0-T5, and service_detection as a boolean with default True. This exceeds the baseline and provides comprehensive meaning.

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 the tool performs a port scan with XML output and returns structured host/port/service data. It explicitly contrasts with nmap_port_scan (raw text), highlighting the parsing into structured dicts, which effectively differentiates it from the sibling 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?

The description explicitly names nmap_port_scan as an alternative and explains the difference: use this tool for structured XML output that doesn't require regex, versus raw text. This gives clear when-to-use guidance and an explicit alternative, meeting the highest bar.

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/Neeraj829784/kali-mcp'

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