Skip to main content
Glama

tcp_port_check

Check if a specific TCP port on a host accepts connections. Resolves whether a service is listening to diagnose connectivity issues.

Instructions

Check whether ONE TCP port on a host accepts connections.

Answers: "Is the service listening?" — e.g. 443 on a payment gateway, 22 on a store server, 5432 on a database. This is deliberately a single-port diagnostic, not a scanner: exactly one integer port per call; ranges and lists are rejected.

Args: host: Hostname, IPv4, or IPv6 address. port: A single TCP port, integer 1..65535. timeout: Connect timeout in seconds, clamped to 1..30 (default 5).

Returns: On success: {"ok": true, "host", "port", "state": "open" | "closed" | "timeout", "latency_ms" (connect time for open/closed, null on timeout)}. On failure (unresolvable host, invalid port): {"ok": false, "error": "..."}.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
hostYes
portYes
timeoutNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. First observedv0.1.0

TDQS

A4.5/5.0
Behavior4/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It covers key behaviors: returns states like 'open', 'closed', 'timeout', includes latency measurement, timeout clamping, and error conditions. It also explains what happens on unresolved hosts or invalid ports. This is comprehensive but could mention potential side effects (e.g., triggering firewall alerts) or idempotency. Still, given the zero-annotation context, it does a solid job.

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 highly concise, using bullet points for parameters and returns. Every sentence adds value: the opening analogy and examples clarify purpose instantly. The format is well-structured with clear sections for purpose, args, and returns. No fluff or redundancy observed.

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?

Given the tool's moderate complexity (3 parameters, single-port diagnostic), the description is fully complete. It explains purpose, usage constraints, each parameter's meaning and constraints, return format for both success and failure, and differentiates from other tools implicitly. The output schema is provided, so return values need no further elaboration. No gaps remain.

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

Parameters4/5

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

The input schema has 3 parameters with 0% description coverage, so the description must add meaning. It does this effectively: 'host' gets clarification (hostname, IPv4, or IPv6), 'port' gets a single integer and range (1..65535), 'timeout' gets a default of 5 and clamping range. This adds significant semantic value beyond the raw schema, which only provides names and types. A minor deduction: the description could mention that timeout is optional (default handled), but it is essentially clear.

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 'Check whether ONE TCP port on a host accepts connections.' This is a specific verb (check) with a distinct resource (single TCP port). It also explicitly distinguishes itself from a scanner, noting exactly one integer port per call, and provides real-world examples (e.g., 443 on a payment gateway). This differentiates it from sibling tools like ping_host or traceroute_host.

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?

The description explains when to use the tool ('Is the service listening?') and gives concrete examples. It also explicitly states what not to do: 'This is deliberately a single-port diagnostic, not a scanner: exactly one integer port per call; ranges and lists are rejected.' However, it does not explicitly name sibling tools as alternatives for broader scans (e.g., fleet_sweep) or other networking diagnostics (ping, dns_lookup). Thus, it provides clear context and exclusions but stops short of cross-referencing alternatives.

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

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/seifosmaan53/fleetcheck-mcp'

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