count_earthquakes

Pack: usgs-earthquakes · Connect: https://pipeworx.io/mcp (see Connect below for a single-pack URL)

No MCP client? Call it directly: GET https://gateway.pipeworx.io/v1/tools/count_earthquakes for the schema, then POST the same URL with its arguments for the data.

Count earthquakes matching a filter without returning the events — fast for questions like “how many M5+ quakes in the last 7 days near X”. Same filters as search_earthquakes (time, magnitude, circular area); for “last N days/hours” questions pass days/hours rather than computing start_time yourself. The response echoes the exact start_time/end_time and magnitude filter actually queried, ahead of the count itself. Keyless.

Parameters

NameTypeRequiredDescription
start_timestringno
end_timestringno
daysnumberno
hoursnumberno
min_magnitudenumbernoMinimum magnitude (e.g. 5 for M5+).
max_magnitudenumbernoMaximum magnitude.
latitudenumbernoCenter latitude for a circular search.
longitudenumbernoCenter longitude for a circular search.
max_radius_kmnumbernoSearch radius in km around latitude/longitude.

Example call

Arguments

{
  "min_magnitude": 5,
  "days": 7
}

curl

curl -X POST https://gateway.pipeworx.io/usgs-earthquakes/mcp \
  -H 'Content-Type: application/json' \
  -d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"count_earthquakes","arguments":{"min_magnitude":5,"days":7}}}'

TypeScript (@pipeworx/sdk)

import { Pipeworx } from '@pipeworx/sdk';
const pipeworx = new Pipeworx();

const result = await pipeworx.call('count_earthquakes', {
  "min_magnitude": 5,
  "days": 7
});

More examples

{
  "latitude": 35,
  "longitude": 139,
  "max_radius_km": 200,
  "min_magnitude": 6.5,
  "start_time": "2026-01-01"
}

Connect

Add this to your MCP client config — every tool in the catalog, including this one — or use one-click install buttons:

{
  "mcpServers": {
    "pipeworx": {
      "url": "https://pipeworx.io/mcp"
    }
  }
}
Connect to just the usgs-earthquakes pack
{
  "mcpServers": {
    "usgs-earthquakes": {
      "url": "https://gateway.pipeworx.io/usgs-earthquakes/mcp"
    }
  }
}

See Getting Started for client-specific install steps.

Regenerated from source · build October 23, 2026