Skip to main content
Glama

earthquake-mcp-server

Count Earthquakes

earthquake_count_events
Read-onlyIdempotent

Count matches without event records, or size an earthquake_search_events query. Omitting start_time uses 30 days; pass explicit bounds for historical periods. queryEcho reports applied filters/window; ignoredFilters names unsupported EMSC inputs. Circle and independently optional box edges intersect. Both catalogs include non-tectonic events; event_type="earthquake" excludes them on USGS. exceeds_limit marks the 20,000-event single-request threshold, not a retrieval ceiling: search supports offset paging beyond it. max_allowed is 20,000 for USGS, null for EMSC.

Input Schema

NameRequiredDescriptionDefault
sourceNoData source. Both catalogs are global. "usgs" covers global events with PAGER, DYFI, and ShakeMap metadata. "emsc" is an independent global catalog operated by the European-Mediterranean Seismological Centre — use it to cross-check a count from a separate network. It has no PAGER, DYFI, or ShakeMap metadata; its station coverage is densest around Europe and the Mediterranean, so counts of small events differ most by region.usgs
min_cdiNoMinimum DYFI (Did You Feel It?) community intensity (1–12): the strongest shaking people reported for the event. An event without DYFI reports never matches. Only available from USGS.
min_mmiNoMinimum ShakeMap intensity on the Modified Mercalli scale (1–12): the strongest shaking USGS modeled for the event, e.g. 7 for very strong shaking. Finds shaking a magnitude floor or alert_level misses. An event without a ShakeMap never matches; product_type "shakemap" requires one at any intensity. Only available from USGS.
end_timeNoEnd of time range as ISO 8601, in the same forms start_time accepts. Date-only values mean midnight at the start of the named day, not the whole day. Defaults to current time if omitted.
latitudeNoLatitude for radius search. Requires longitude and radius_km.
min_feltNoMinimum number of DYFI (Did You Feel It?) reports. Use to count events with confirmed public impact. Only available from USGS.
longitudeNoLongitude for radius search. Requires latitude and radius_km.
radius_kmNoSearch radius in kilometers from the lat/lon point. Max 20001.6, the ceiling USGS enforces — half the Earth's great-circle circumference. Converted to degrees for EMSC (1° ≈ 111.2 km).
event_typeNoFilter by upstream event classification, e.g. "earthquake" to exclude quarry blasts and explosions from the count, or "quarry blast" to count only those; a comma-separated list such as "earthquake,explosion" counts any of them. USGS matches case-insensitively and counts zero for a value it does not list, which the notice then names. Only available from USGS.
start_timeNoStart of time range as ISO 8601 (e.g. "2026-01-01" or "2026-05-23T00:00:00"). A bare year expands to January 1st and an unpadded month or day is zero-padded, with date-only values resolved to midnight (T00:00:00) on both sources. Explicit time and timezone suffixes are preserved. Defaults to 30 days before end_time (or before the current time) if omitted — applied server-side so USGS and EMSC honor the same window.
alert_levelNoMinimum PAGER alert level. PAGER estimates economic loss and casualties. "green" = minimal impact; "red" = extreme. Only available from USGS.
max_depth_kmNoMaximum depth in kilometers. Bounded to the documented -100 to 1000 km catalog envelope.
max_latitudeNoNorthern edge of a bounding-box search, in degrees.
min_depth_kmNoMinimum depth in kilometers. Bounded to the documented -100 to 1000 km catalog envelope. Shallow quakes (0–70 km) typically cause more surface damage than deep quakes (>300 km).
min_latitudeNoSouthern edge of a bounding-box search, in degrees. Independent of the other three box parameters — supply any of them. Must not exceed max_latitude when both are given.
product_typeNoRequired product type, e.g. "moment-tensor" (hyphenated, unlike the moment_tensor detail group); USGS only, matched case-insensitively. Blank means omitted.
max_longitudeNoEastern edge of a bounding-box search, in degrees.
max_magnitudeNoMaximum magnitude.
min_longitudeNoWestern edge of a bounding-box search, in degrees. Range extends beyond ±180 so a box can cross the antimeridian (e.g. min_longitude=170, max_longitude=190) — always keep min_longitude at or below max_longitude rather than inverting the pair.
min_magnitudeNoMinimum magnitude (Richter or equivalent). M2.5+ is felt by some people; M5+ can cause damage; M7+ is major.
review_statusNoUSGS review status: automatic or reviewed. Blank means omitted; unsupported by EMSC.
magnitude_typeNoMagnitude type, e.g. "mb" or "mww"; both sources. USGS matches case-insensitively; EMSC matches its own lowercase types ("mb", "mw") case-sensitively and has no "mww". Blank means omitted.
min_significanceNoMinimum USGS significance score (0–2000+). Combines magnitude, felt reports, and PAGER estimates. Significant events typically score 600+. Only available from USGS.

Output Schema

NameRequiredDescriptionDefault
countNoNumber of events matching the query.
errorNoPresent when the call failed. Absent on success.
noticeNoOn a USGS count of zero, names each supplied event_type, magnitude_type, or product_type value USGS does not list, which matches no events, with the listed value it likely meant. Absent otherwise.
sourceNoData source used.
queryEchoNoEcho of the effective parameters the count covers, including server-resolved defaults. Read start_time and end_time to know which window the count spans — a filter absent here was not sent upstream.
max_allowedNoUpstream single-request threshold: 20000 for USGS; null because EMSC count omits it. Offset paging can retrieve larger sets.
exceeds_limitNoCount exceeds the single-request threshold (20000 for EMSC despite null max_allowed). Use search offset paging or narrower filters.
ignoredFiltersNoUSGS-only filters supplied in the input but not sent upstream because source=emsc does not support them. The count is NOT constrained by these — re-run with source=usgs to apply them. Absent when every supplied filter was applied.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed9 schema fields changed
    • changedInput schema / properties / event_type / description
      Previous value: -"Filter by upstream event classification, e.g. \"earthquake\" to exclude quarry blasts and explosions from the count, or \"quarry blast\" to count only those. Matched verbatim against the USGS catalog, which accepts any string and returns a count of zero for an unrecognized one. Only available from USGS."New value: +"Filter by upstream event classification, e.g. \"earthquake\" to exclude quarry blasts and explosions from the count, or \"quarry blast\" to count only those; a comma-separated list such as \"earthquake,explosion\" counts any of them. USGS matches case-insensitively and counts zero for a value it does not list, which the notice then names. Only available from USGS."
    • changedInput schema / properties / magnitude_type / description
      Previous value: -"Magnitude type, e.g. \"mb\" or \"mww\"; both sources. Blank means omitted."New value: +"Magnitude type, e.g. \"mb\" or \"mww\"; both sources. USGS matches case-insensitively; EMSC matches its own lowercase types (\"mb\", \"mw\") case-sensitively and has no \"mww\". Blank means omitted."
    • addedInput schema / properties / min_cdi
      Added value: +{
      +  "description": "Minimum DYFI (Did You Feel It?) community intensity (1–12): the strongest shaking people reported for the event. An event without DYFI reports never matches. Only available from USGS.",
      +  "maximum": 12,
      +  "minimum": 1,
      +  "type": "number"
      +}
    • addedInput schema / properties / min_mmi
      Added value: +{
      +  "description": "Minimum ShakeMap intensity on the Modified Mercalli scale (1–12): the strongest shaking USGS modeled for the event, e.g. 7 for very strong shaking. Finds shaking a magnitude floor or alert_level misses. An event without a ShakeMap never matches; product_type \"shakemap\" requires one at any intensity. Only available from USGS.",
      +  "maximum": 12,
      +  "minimum": 1,
      +  "type": "number"
      +}
    • changedInput schema / properties / product_type / description
      Previous value: -"Required product type, e.g. \"moment-tensor\"; USGS only. Blank means omitted."New value: +"Required product type, e.g. \"moment-tensor\" (hyphenated, unlike the moment_tensor detail group); USGS only, matched case-insensitively. Blank means omitted."
    • changedOutput schema / properties / error / properties / data / properties / reason / description
      Previous value: -"Machine-readable failure mode. Declared by this tool: `invalid_range`: Minimum magnitude or depth exceeds its maximum, or start_time is after end_time. `invalid_radius`: latitude or longitude provided without radius_km, or vice versa. `invalid_bounding_box`: min_latitude exceeds max_latitude, or min_longitude exceeds max_longitude. `source_unavailable`: Selected source API returns a 5xx or is unreachable. `source_timeout`: Selected source API did not answer before the request deadline. `upstream_rejected`: The source API rejected the query parameters and explained why in its response body. `upstream_rejected_no_reason`: The source API rejected the query but its response body carried no usable explanation. Other values are possible when a failure originates below the handler."New value: +"Machine-readable failure mode. Declared by this tool: `invalid_range`: Minimum magnitude or depth exceeds its maximum, or start_time is after end_time. `invalid_radius`: latitude or longitude provided without radius_km, or vice versa. `invalid_bounding_box`: min_latitude exceeds max_latitude, or min_longitude exceeds max_longitude. `source_unavailable`: Selected source API returns a 5xx, serves HTML or an unreadable body, or is unreachable. `source_timeout`: Selected source API did not answer before the request deadline. `upstream_rejected`: The source API rejected the query parameters and explained why in its response body. `upstream_rejected_no_reason`: The source API rejected the query but its response body carried no usable explanation. Other values are possible when a failure originates below the handler."
    • addedOutput schema / properties / notice
      Added value: +{
      +  "description": "On a USGS count of zero, names each supplied event_type, magnitude_type, or product_type value USGS does not list, which matches no events, with the listed value it likely meant. Absent otherwise.",
      +  "type": "string"
      +}
    • addedOutput schema / properties / queryEcho / properties / min_cdi
      Added value: +{
      +  "description": "Applied minimum DYFI community intensity (CDI); absent for EMSC.",
      +  "type": "number"
      +}
    • addedOutput schema / properties / queryEcho / properties / min_mmi
      Added value: +{
      +  "description": "Applied minimum ShakeMap intensity (MMI); absent for EMSC.",
      +  "type": "number"
      +}
  2. Changed22 schema fields changed
    • addedInput schema / properties / magnitude_type
      Added value: +{
      +  "description": "Magnitude type, e.g. \"mb\" or \"mww\"; both sources. Blank means omitted.",
      +  "type": "string"
      +}
    • addedInput schema / properties / product_type
      Added value: +{
      +  "description": "Required product type, e.g. \"moment-tensor\"; USGS only. Blank means omitted.",
      +  "type": "string"
      +}
    • addedInput schema / properties / review_status
      Added value: +{
      +  "description": "USGS review status: automatic or reviewed. Blank means omitted; unsupported by EMSC.",
      +  "type": "string"
      +}
    • changedOutput schema / properties / error / properties / data / properties / reason / description
      Previous value: -"Machine-readable failure mode. Declared by this tool: `invalid_radius`: latitude or longitude provided without radius_km, or vice versa. `invalid_bounding_box`: min_latitude exceeds max_latitude, or min_longitude exceeds max_longitude. `source_unavailable`: Selected source API returns a 5xx or is unreachable. `source_timeout`: Selected source API did not answer before the request deadline. `upstream_rejected`: The source API rejected the query parameters and explained why in its response body. `upstream_rejected_no_reason`: The source API rejected the query but its response body carried no usable explanation. Other values are possible when a failure originates below the handler."New value: +"Machine-readable failure mode. Declared by this tool: `invalid_range`: Minimum magnitude or depth exceeds its maximum, or start_time is after end_time. `invalid_radius`: latitude or longitude provided without radius_km, or vice versa. `invalid_bounding_box`: min_latitude exceeds max_latitude, or min_longitude exceeds max_longitude. `source_unavailable`: Selected source API returns a 5xx or is unreachable. `source_timeout`: Selected source API did not answer before the request deadline. `upstream_rejected`: The source API rejected the query parameters and explained why in its response body. `upstream_rejected_no_reason`: The source API rejected the query but its response body carried no usable explanation. Other values are possible when a failure originates below the handler."
    • changedOutput schema / properties / error / properties / data / properties / reason / examples
      Previous value: -[
      -  "invalid_radius",
      -  "invalid_bounding_box",
      -  "source_unavailable",
      -  "source_timeout",
      -  "upstream_rejected",
      -  "upstream_rejected_no_reason"
      -]New value: +[
      +  "invalid_range",
      +  "invalid_radius",
      +  "invalid_bounding_box",
      +  "source_unavailable",
      +  "source_timeout",
      +  "upstream_rejected",
      +  "upstream_rejected_no_reason"
      +]
    • changedOutput schema / properties / exceeds_limit / description
      Previous value: -"True when count exceeds 20000 — a full earthquake_search_events would be truncated. For EMSC, evaluated against the known 20000 limit since max_allowed is not returned. Narrow filters to retrieve all matching events."New value: +"Count exceeds the single-request threshold (20000 for EMSC despite null max_allowed). Use search offset paging or narrower filters."
    • changedOutput schema / properties / max_allowed / description
      Previous value: -"Maximum events the API would return for a full fetch. 20000 for USGS. Null for EMSC — the EMSC count endpoint does not return this field."New value: +"Upstream single-request threshold: 20000 for USGS; null because EMSC count omits it. Offset paging can retrieve larger sets."
    • changedOutput schema / properties / queryEcho / properties / alert_level / description
      Previous value: -"PAGER alert filter sent upstream. Absent for EMSC — not supported there."New value: +"Applied minimum PAGER alert; absent for EMSC."
    • changedOutput schema / properties / queryEcho / properties / end_time / description
      Previous value: -"Effective query end time. Absent when omitted from input — the upstream defaults to the current time."New value: +"Applied end time; absent means upstream current-time default."
    • changedOutput schema / properties / queryEcho / properties / event_type / description
      Previous value: -"Event-type filter sent upstream. Absent for EMSC — not supported there."New value: +"Applied event type; absent for EMSC."
    • changedOutput schema / properties / queryEcho / properties / latitude / description
      Previous value: -"Radius-search latitude sent upstream."New value: +"Circle latitude, degrees."
    • changedOutput schema / properties / queryEcho / properties / longitude / description
      Previous value: -"Radius-search longitude sent upstream."New value: +"Circle longitude, degrees."
    • addedOutput schema / properties / queryEcho / properties / magnitude_type
      Added value: +{
      +  "description": "Applied magnitude type.",
      +  "type": "string"
      +}
    • changedOutput schema / properties / queryEcho / properties / max_depth_km / description
      Previous value: -"Maximum depth filter sent upstream."New value: +"Applied maximum depth, km."
    • changedOutput schema / properties / queryEcho / properties / max_magnitude / description
      Previous value: -"Maximum magnitude filter sent upstream."New value: +"Applied maximum magnitude."
    • changedOutput schema / properties / queryEcho / properties / min_depth_km / description
      Previous value: -"Minimum depth filter sent upstream."New value: +"Applied minimum depth, km."
    • changedOutput schema / properties / queryEcho / properties / min_felt / description
      Previous value: -"DYFI felt-report filter sent upstream. Absent for EMSC — not supported there."New value: +"Applied minimum DYFI response count; absent for EMSC."
    • changedOutput schema / properties / queryEcho / properties / min_magnitude / description
      Previous value: -"Minimum magnitude filter sent upstream."New value: +"Applied minimum magnitude."
    • changedOutput schema / properties / queryEcho / properties / min_significance / description
      Previous value: -"Significance filter sent upstream. Absent for EMSC — not supported there."New value: +"Applied minimum significance; absent for EMSC."
    • addedOutput schema / properties / queryEcho / properties / product_type
      Added value: +{
      +  "description": "Applied required product; USGS only.",
      +  "type": "string"
      +}
    • addedOutput schema / properties / queryEcho / properties / review_status
      Added value: +{
      +  "description": "Applied review status; USGS only.",
      +  "enum": [
      +    "automatic",
      +    "reviewed"
      +  ],
      +  "type": "string"
      +}
    • changedOutput schema / properties / queryEcho / properties / start_time / description
      Previous value: -"Effective query start time sent upstream — server-resolved to a 30-day window when omitted from input."New value: +"Applied start time; defaults to 30 days before end/now."
  3. Added

TDQS

A4.6/5.0
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations only declare readOnly/idempotent/openWorld; the description adds genuinely non-obvious behavior: exceeds_limit is a per-request threshold rather than a retrieval ceiling because search supports offset paging, max_allowed is 20,000 on USGS and null on EMSC, circle and box edges intersect rather than override, and both catalogs include non-tectonic events that event_type="earthquake" removes only on USGS. These are operational traits an agent could not infer from the annotations.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Information is tightly packed and front-loaded: purpose first, then defaults, then output-field semantics, then limits. The telegraphic phrasing ("Count matches without event records", clause-chained sentences about queryEcho/ignoredFilters) is efficient but costs some readability, so it is not flawless.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a 23-parameter, both-source counting tool with an output schema and safety annotations already in place, the description covers the remaining decision-relevant gaps: default time window, cross-source divergences (ignoredFilters, max_allowed null), filter intersection semantics, and how to go past the per-request cap.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so the baseline is 3; the description earns above that by documenting cross-parameter semantics the schema does not, notably that radius and box constraints intersect and that omitting start_time triggers a server-side 30-day default applied identically on both sources. It does not restate individual parameter bounds, which is correct given the rich schema.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

"Count matches without event records, or size an earthquake_search_events query" gives a specific verb (count), the resource (events matching filters), and explicitly positions the tool relative to its sibling search_events. An agent can distinguish count vs. retrieve without opening either schema.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

It names the alternative (earthquake_search_events) and the condition that selects it (sizing/counting vs. retrieving records), and clarifies that omitting start_time applies a 30-day window while historical periods need explicit bounds. It stops short of saying when NOT to use this tool (e.g., when the agent needs per-event metadata such as PAGER/DYFI products), which the sibling names imply but do not state.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.