get_earthquake_details
Retrieve comprehensive seismic event information using Swiss Seismological Service event IDs to analyze earthquake details and characteristics.
Instructions
Get full details for a specific seismic event by its SED (Swiss Seismological Service) event ID. Use event IDs returned by get_recent_earthquakes or search_earthquakes_by_location.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| event_id | Yes | The SED event ID (e.g. 'smi:ch.ethz.sed/sc25a/Event/2026errxzt'). Obtain from get_recent_earthquakes or search_earthquakes_by_location. |
Implementation Reference
- src/modules/earthquakes.ts:272-310 (handler)The handler function for the get_earthquake_details tool. It takes an event_id, fetches data from the SED API, parses the response, and returns the earthquake details.
async function handleGetEarthquakeDetails( args: Record<string, string> ): Promise<string> { const eventId = args.event_id?.trim(); if (!eventId) { throw new Error("event_id is required"); } const url = buildUrl(BASE, { eventid: eventId, format: "text", }); const raw = await fetchFdsnText(url); if (!raw) { return JSON.stringify({ error: "Event not found", event_id: eventId, source: "Swiss Seismological Service (SED), ETH Zürich", }); } const events = parseFdsnText(raw); if (events.length === 0) { return JSON.stringify({ error: "Event not found or could not be parsed", event_id: eventId, source: "Swiss Seismological Service (SED), ETH Zürich", }); } return JSON.stringify({ source: "Swiss Seismological Service (SED), ETH Zürich", api: "FDSN Event Web Service — http://arclink.ethz.ch/fdsnws/event/1/", event: events[0], }); } - src/modules/earthquakes.ts:74-91 (schema)The schema definition for get_earthquake_details tool.
{ name: "get_earthquake_details", description: "Get full details for a specific seismic event by its SED (Swiss Seismological Service) event ID. " + "Use event IDs returned by get_recent_earthquakes or search_earthquakes_by_location.", inputSchema: { type: "object", required: ["event_id"], properties: { event_id: { type: "string", description: "The SED event ID (e.g. 'smi:ch.ethz.sed/sc25a/Event/2026errxzt'). " + "Obtain from get_recent_earthquakes or search_earthquakes_by_location.", }, }, }, }, - src/modules/earthquakes.ts:381-382 (registration)Tool registration/invocation point in the main dispatcher function handleEarthquakes.
case "get_earthquake_details": return handleGetEarthquakeDetails(args as Record<string, string>);