Port Check
Check whether TCP ports are open on a host. Scans up to 20 ports with a set timeout and returns each port's status and latency.
Pay by wallet (x402)
port-check Example
Input
{
"host": "google.com",
"ports": 443
} Answer
{
"host": "google.com",
"open_count": 1,
"open_ports": [
{
"open": true,
"port": 443,
"service": "HTTPS",
"latency_ms": 1
}
],
"closed_count": 0,
"closed_ports": [],
"ports_scanned": 1,
"scan_timeout_ms": 3000
} Inputs
| Field | Type | Required | What it is |
|---|---|---|---|
host | string | Yes | — |
ports | any | No | Array of port numbers or comma-separated string |
timeout_ms | integer | No | — |
Output fields
How reliably each field appears in a successful answer.
| Field | Type | Appears |
|---|---|---|
host | string | Always (present in every successful answer) |
open_count | integer | Always (present in every successful answer) |
open_ports | array | Always (present in every successful answer) |
closed_count | integer | Always (present in every successful answer) |
closed_ports | array | Always (present in every successful answer) |
How to call it
The same tool through each route. MCP clients reach it through Strale’s server at https://api.strale.io/mcp; the call below is what the agent sends.
# Needs an API key. max_price_cents caps what this call may cost.
curl -X POST https://api.strale.io/v1/do \
-H "Authorization: Bearer $STRALE_API_KEY" \
-H 'Content-Type: application/json' \
-d '{
"capability_slug": "port-check",
"inputs": {
"host": "google.com",
"ports": 443
},
"max_price_cents": 5
}' {
"tool": "strale_execute",
"arguments": {
"slug": "port-check",
"inputs": {
"host": "google.com",
"ports": 443
},
"max_price_cents": 5
}
} import { Strale } from "straleio";
const strale = new Strale({ apiKey: process.env.STRALE_API_KEY! });
const result = await strale.do({
capability_slug: "port-check",
inputs: {
"host": "google.com",
"ports": 443
},
max_price_cents: 5,
}); import os
from straleio import Strale, DoRequest
strale = Strale(api_key=os.environ["STRALE_API_KEY"])
result = strale.do(DoRequest(
capability_slug="port-check",
inputs={
"host": "google.com",
"ports": 443,
},
max_price_cents=5,
)) # No account. The first request answers 402 with the price in USDC;
# an x402 client pays it from your wallet and repeats the request.
curl -i 'https://api.strale.io/x402/v2/port-check?host=google.com&ports=443' Limitations
Firewalls can block probes despite a reachable service
TCP connection test only — firewalls may block probes from Strale's IP range while allowing traffic from other sources
What to do instead: If a port shows as closed, verify from your own network before concluding the service is down
Related tools
- Mail Server Lookup €0.02
- Page Existence Check €0.02
- Redirect Trace €0.05
- Robots.txt Parser €0.02
- Sitemap Parser €0.05
- SSL Certificate Chain €0.05