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.
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": {
"port": "<port>"
},
"name": "check_port"
}
}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 |