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
| Name | Required | Description | Default |
|---|---|---|---|
| host | Yes | ||
| port | Yes | ||
| timeout | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||