check_port
Test whether a TCP port accepts connections to verify a service is listening, returning open, refused, timeout, or DNS failure status.
Instructions
Test whether a TCP port is accepting connections.
Performs a TCP connect to host:port with a timeout. Useful for verifying a service is listening ("is Postgres up on 5432?") before deeper diagnosis.
Returns: str: One-line result: open, closed/refused, timed out, or DNS resolution failure, with latency when the port is open.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| host | No | Hostname or IP to check (e.g. '127.0.0.1', 'db.internal'). | 127.0.0.1 |
| port | Yes | TCP port number to test (e.g. 22, 443, 5432). | |
| timeout_seconds | No | Connection timeout in seconds. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |