get_high_tide_flooding_seasonal
Retrieve seasonal high tide flooding counts for a specific station, filtered by threshold, datum, and time range, in JSON, XML, or CSV format, to analyze coastal flooding trends.
Instructions
Get high tide flooding seasonal count data for a station
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| begin_date | No | Start date (YYYYMMDD format) | |
| datum | No | Datum reference for DPAPI | |
| end_date | No | End date (YYYYMMDD format) | |
| format | No | Output format (json, xml, csv) | |
| season_months | No | Season months (DJF-Winter, MAM-Spring, JJA-Summer, SON-Fall) | |
| station | Yes | Station ID | |
| threshold | No | Flood threshold level | |
| year | No | Year for analysis (YYYY format) |
Implementation Reference
- src/services/dpapi-service.ts:117-125 (handler)Core handler function that fetches high tide flooding seasonal data from the DPAPI '/htf/seasonal' endpoint using the service's fetch method.async getHighTideFloodingSeasonal(params: Record<string, any>): Promise<any> { const { station, format = 'json', ...rest } = params; return this.fetchDpapi('/htf/seasonal', { station, format, ...rest }); }
- src/schemas/dpapi.ts:51-60 (schema)Zod schema defining input parameters for the get_high_tide_flooding_seasonal tool.export const HighTideFloodingSeasonalSchema = z.object({ station: StationSchema, format: FormatSchema, datum: DpapiDatumSchema, threshold: ThresholdSchema, season_months: SeasonSchema, begin_date: z.string().optional().describe('Start date (YYYYMMDD format)'), end_date: z.string().optional().describe('End date (YYYYMMDD format)'), year: YearSchema }).describe('Get high tide flooding seasonal count data');
- src/tools/derived-product-tools.ts:92-107 (registration)Registers the 'get_high_tide_flooding_seasonal' tool with MCP server, including schema and thin wrapper execute handler that delegates to the service.server.addTool({ name: 'get_high_tide_flooding_seasonal', description: 'Get high tide flooding seasonal count data for a station', parameters: HighTideFloodingSeasonalSchema, execute: async (params) => { try { const result = await dpapiService.getHighTideFloodingSeasonal(params); return JSON.stringify(result); } catch (error) { if (error instanceof Error) { throw new Error(`Failed to get high tide flooding seasonal data: ${error.message}`); } throw new Error('Failed to get high tide flooding seasonal data'); } } });