Skip to main content
Glama

port_scan

Scan authorized hosts for open TCP ports using presets or custom ranges, and grab plaintext service banners to support reconnaissance.

Instructions

TCP connect scan. Presets: top20, top100, web, db, common - or "80,443,8000-8100".

Only scan hosts you are authorized to test. Grabs a small plaintext banner where possible. Uses asyncio so it is fast but still a real connect scan.

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": {
      "host": "<host>"
    },
    "name": "port_scan"
  }
}

Input Schema

NameRequiredDescriptionDefault
hostYes
portsNotop20
timeoutNo
concurrencyNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv2.0.0

TDQS

B3.4/5.0
Behavior4/5

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

With no annotations, the description carries the full burden, and it does disclose real behavioral traits: this is a genuine connect scan (as opposed to a stealthier SYN scan), it grabs small plaintext banners where possible, and it uses asyncio for speed. It does not say what happens for closed/filtered ports, how failures surface, or how results are shaped, which keeps it short of a 5.

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?

Three short sentences, front-loaded with the scan type and port syntax before the safety caveat and mechanics; nothing is redundant. Minor dead weight in the trailing "still a real connect scan" aside, but it is under 300 characters total.

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

Completeness3/5

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

For a four-parameter network tool with no annotations and no output schema, the description covers mode, banner behavior, and performance but never indicates what a result contains (open ports, banner text, timing) or how timeouts/concurrency affect the scan. An agent can call it, but cannot predict the response or tune it intelligently.

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

Parameters2/5

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

Schema coverage is 0%, so the description must define all four parameters, but it only clarifies `ports` — naming the top20/top100/web/db/common presets and the "80,443,8000-8100" range syntax. `host`, `timeout`, and `concurrency` receive no explanation at all, leaving half the tool's tuning surface undocumented.

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 opens with a specific verb+resource, "TCP connect scan," and immediately enumerates what it scans and the preset/range port syntax, so an agent knows exactly what the tool does. It does not mention any sibling (dns_lookup, crtsh_subdomains) or explain why one would pick this over another network tool, which keeps it at 4 rather than 5.

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?

Usage is only implied: the preset list hints at ordinary port-scanning scenarios and the authorization sentence sets a precondition ("Only scan hosts you are authorized to test"). There is no explicit when-to-use vs. when-not-to-use guidance and no named alternative tool for adjacent discovery tasks.

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