list_my_hosts
List hosts discovered across your organisation's EdgeProtect scans (hostname, FQDN, OS) with IP and open-port counts. Costs 1 credit.
tools/callCost: 1 credit per successful call · Scope: mcp:org · Response shape: jsonb
Returns data scoped to your own organisation only — the organisation is resolved from your API key and injected server-side, never read from the request.
Parameters
limitintegeroptionaldefault: 100Maximum number of hosts to return. Accepted range: 1–500.
Example invocation
Ask your agent: "List our discovered hosts and how many open ports each has."
curl -s https://api.precursorintelligence.com/functions/v1/mcp \
-H "Authorization: Bearer $PRECURSOR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"list_my_hosts","arguments":{"limit":100}}}'Response
{
"count": 2,
"items": [
{
"hostname": "autodiscover",
"fqdn": "autodiscover.precursorsecurity.com",
"os_name": "Windows Server 2019",
"os_family": "Windows",
"status": "up",
"last_seen": "2026-06-17T02:14:00.000Z",
"ip_count": 1,
"open_ports": 3
},
{
"hostname": "mail",
"fqdn": "mail.precursorsecurity.com",
"os_name": "Ubuntu Linux",
"os_family": "Linux",
"status": "up",
"last_seen": "2026-06-16T22:48:00.000Z",
"ip_count": 2,
"open_ports": 2
}
],
"generated_at": "2026-06-18T08:15:00.000Z"
}The full MCP envelope, including _meta.precursor with request_id, credits, and response_truncated, is documented in Response Format.
Response fields
countintegeroptionalNumber of hosts returned (equals items.length).
itemsarrayoptionalDiscovered hosts within your organisation. Each object contains the fields below.
items[].hostnamestringoptionalShort hostname of the discovered host.
items[].fqdnstringoptionalFully qualified domain name, e.g. autodiscover.precursorsecurity.com.
items[].os_namestring | nulloptionalDetected operating system name, e.g. Windows Server 2019.
items[].os_familystring | nulloptionalOperating system family, e.g. Windows, Linux.
items[].statusstringoptionalHost reachability status from the most recent scan, e.g. up, down.
items[].last_seenstringoptionalISO 8601 timestamp of when the host was last observed (UTC).
items[].ip_countintegeroptionalNumber of distinct IP addresses associated with the host.
items[].open_portsintegeroptionalNumber of open ports detected on the host.
generated_atstringoptionalISO 8601 timestamp indicating when this response was generated.
Errors
| Code | Message | When |
|---|---|---|
-32602 | invalid_params: limit: min:1 | limit is less than 1 |
-32602 | invalid_params: limit: max:500 | limit exceeds 500 |
-32001 | unauthorized | The API key is invalid/revoked, the IP is not allowed, or the key lacks the mcp:org scope. |
-32002 | insufficient_credits | Your credit balance is zero; top up from the dashboard |
-32603 | internal | Unexpected server error; the credit is automatically refunded |