Skip to main content
Glama

scan_ports

Checks which common TCP ports are open on an authorized host, helping identify exposed services during permitted security testing.

Instructions

Check which common TCP ports are open on a host.

Only call this with authorized=True if the user has confirmed they own the host or have explicit written permission to test it.

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": "scan_ports"
  }
}

Input Schema

NameRequiredDescriptionDefault
hostYes
portsNo
authorizedNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

B3.4/5.0
Behavior3/5

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

No annotations exist, so the description carries the full burden; it does add the important safety/authorization precondition and the default of authorized=false. However, nothing is said about scan scope ('common' is undefined), whether the traffic is intrusive or detectable/logged, timeouts, rate limits, or what the result looks like.

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?

Two short sentences, front-loaded with the purpose, with the precondition immediately after; nothing is padding. Minor awkwardness from the mid-sentence line break but no wasted content.

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?

The safety gate is covered, which is the most important gap for a security-scan tool with no annotations and no output schema. But an agent still lacks the operational picture: what 'common ports' means, how to pass `ports`, and what the response contains.

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 description coverage is 0%, so the description must compensate for all three parameters. It adds real meaning only for `authorized` (must be true only with confirmed permission); `host` gets no format guidance (IP vs hostname) and the `ports` parameter is never mentioned, with the text even implying a fixed 'common' set.

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?

A specific verb (check) and resource (open TCP ports) on a named target, clearly distinct from the DNS/SSL/CVE siblings. The only blur is 'common TCP ports' versus a `ports` parameter that implies arbitrary port lists.

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?

Explicitly states the precondition for use: call with authorized=True only after the user confirms ownership or written permission. It gives a clear when-to-use gate but never mentions alternatives such as check_ssl or other reconnaissance siblings when the agent's task is adjacent.

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