Skip to main content
Glama

Check Open Ports

check_open_ports
Read-onlyIdempotent

TCP-connect scan a host for open ports, plus network intel on the host's resolved IPs (ASN, network owner, BGP prefix, country — via Team Cymru). Defaults to a list of ~20 common service ports (SSH, HTTP/S, mail, DBs, etc.) if none are given. For checking your own infrastructure's exposure — capped at 100 ports per call.

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

Input Schema

NameRequiredDescriptionDefault
hostYesHostname or IP to scan (no scheme)
portsNoSpecific ports to check. Defaults to a common-ports list. Max 100 ports per call.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A3.9/5.0
Behavior3/5

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

Annotations already declare readOnly, idempotent, openWorld, and non-destructive, so the safety profile is covered. The description adds genuinely useful behavior beyond that: the scan is a TCP-connect (not SYN) scan, the default port set, the 100-port cap, and that IP intel comes from a third party (Team Cymru). It still says nothing about runtime, rate limits, or how results are returned.

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 dense sentences, front-loaded with the primary action and the default behavior before the cap. The Team Cymru parenthetical is slightly crammed but carries real information, so little is wasted.

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?

With no output schema, the description does a fair job of previewing returns by enumerating the intel fields (ASN, network owner, BGP prefix, country). It does not describe the shape of the port results themselves, a minor gap for a two-parameter read-only tool.

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

Parameters3/5

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

Schema coverage is 100%, so both parameters are already documented, including the default list and the 100-port maximum. The description only adds the flavor of the default list (SSH, HTTP/S, mail, DBs), which is marginal value over the schema; baseline 3 applies.

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?

States a specific verb and technique ("TCP-connect scan a host for open ports") plus a secondary capability (network intel on resolved IPs: ASN, owner, BGP prefix, country). This clearly separates it from siblings like smtp_server_check or ssl_cert_check, which target a single service rather than a port sweep.

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?

Gives a clear use context: "For checking your own infrastructure's exposure," which tells the agent the intended scenario. It does not name alternatives or state when not to use it (e.g., vs. a single-service probe), so it stops short of full routing guidance.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.