Server health and data-source catalog probe.
Doubles as the version and health endpoint: returns server_version so an
agent can confirm which release it is talking to. Also returns the full
upstream-source catalog: cache TTLs, freshness expectations, and
licenses. Use it to judge whether a stale cached response is fine or a
re-fetch is needed.
Examples:
get_data_freshness() # the only call, it takes no arguments
On failure: this tool calls no upstream itself, so it always returns a
dict. source_health is a process-local, in-memory registry, not a
database. It starts empty on a cold process and fills as
fetch_with_retry runs calls, so a fresh restart always reports an empty
dict here.
Returns: server_version, server_name, transport, tool_count, asof,
sources (list of {source, source_url, freshness, cache_ttl_seconds,
license}), source_health (per-host {last_success_at, last_failure_at,
last_error, last_latency_ms, success_count, failure_count}), cache_age
(per-cache {size, ttl_seconds}), note.
Get the latest earthquake events from PHIVOLCS.
Reads the live PHIVOLCS earthquake list, the same table shown at
earthquake.phivolcs.dost.gov.ph. Give center_lat, center_lon, and
radius_km together to filter events near one place, and each matched
event then carries a distance_km field. Give all three together, or
leave out all three. Examples:
get_latest_earthquakes() latest events, default filters
get_latest_earthquakes(min_magnitude=4.0, limit=10) strong events only
get_latest_earthquakes(center_lat=14.5995, center_lon=120.9842, radius_km=50) near Manila
On failure: an invalid trio, an out-of-range radius_km, center_lat, or
center_lon gives validation_error true and data_status "invalid_request".
An unreachable or unparsable PHIVOLCS list gives upstream_error true and
data_status "unavailable". Both return results: [] with the real error
in caveats.