Count Earthquakes
count_earthquakesCount 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.
Example tool call
This call uses example arguments supplied in the tool’s input schema.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"days": 7,
"min_magnitude": 5
},
"name": "count_earthquakes"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| days | No | Trailing window length in days, measured back from the exact current time (e.g. days: 7 for "the last 7 days"). Use this instead of computing a start_time for relative-window questions — it is the only way to get an EXACT trailing window rather than a date-boundary approximation. Ignored if start_time or end_time is given. If `hours` is also given, `hours` wins. | |
| hours | No | Trailing window length in hours, measured back from the exact current time (e.g. hours: 168 for "the past 168 hours"). Same precedence as `days` (ignored if start_time/end_time given); takes priority over `days` if both are given. | |
| end_time | No | ISO date/time upper bound, e.g. "2026-06-09". A bare date is treated as 00:00:00 UTC that day. Defaults to now. | |
| latitude | No | Center latitude for a circular search. | |
| longitude | No | Center longitude for a circular search. | |
| start_time | No | ISO date/time lower bound, e.g. "2026-06-01" or "2026-06-01T00:00:00". A bare date (no time) is treated as 00:00:00 UTC that day. If given, this (with end_time) takes precedence over `days`/`hours`, which are then ignored. For "in the last N days" questions, prefer `days` instead of computing this yourself — a model-guessed start_time is a common source of silently-wrong counts. Defaults to 30 days before now if start_time, days, and hours are all omitted. | |
| max_magnitude | No | Maximum magnitude. | |
| max_radius_km | No | Search radius in km around latitude/longitude. | |
| min_magnitude | No | Minimum magnitude (e.g. 5 for M5+). |