check_port_reachable
Test TCP connectivity to a host and port, reporting whether it is reachable or unreachable along with the reason, such as connection refused, timeout, or DNS failure.
Instructions
Try a TCP connect to host:port and report REACHABLE or UNREACHABLE with the reason.
Distinguishes "connection refused" (host is up, nothing listening), "timed out" (firewall drop or host down) and DNS failures. Works for localhost and remote hosts alike. It only connects and disconnects; no data is sent. Timeout is in seconds (0.1 to 30).
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>",
"port": "<port>"
},
"name": "check_port_reachable"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| host | Yes | ||
| port | Yes | ||
| timeout | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |