get_high_tide_flooding_annual
Retrieve annual high tide flooding counts for a specific station based on station ID, date range, flood threshold, and output format. Use this tool to analyze coastal flood data from NOAA Tides and Currents.
Instructions
Get high tide flooding annual 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) | |
| station | Yes | Station ID | |
| threshold | No | Flood threshold level | |
| year_range | No | Year range (YYYY-YYYY format) |
Implementation Reference
- src/services/dpapi-service.ts:132-140 (handler)Core handler method in DpapiService that constructs and fetches data from NOAA DPAPI '/htf/annual' endpoint using shared fetchDpapi utility.async getHighTideFloodingAnnual(params: Record<string, any>): Promise<any> { const { station, format = 'json', ...rest } = params; return this.fetchDpapi('/htf/annual', { station, format, ...rest }); }
- src/tools/derived-product-tools.ts:110-125 (registration)MCP tool registration block that defines the tool name, description, input schema, and execute handler wrapping the service call.server.addTool({ name: 'get_high_tide_flooding_annual', description: 'Get high tide flooding annual count data for a station', parameters: HighTideFloodingAnnualSchema, execute: async (params) => { try { const result = await dpapiService.getHighTideFloodingAnnual(params); return JSON.stringify(result); } catch (error) { if (error instanceof Error) { throw new Error(`Failed to get high tide flooding annual data: ${error.message}`); } throw new Error('Failed to get high tide flooding annual data'); } } });
- src/schemas/dpapi.ts:64-72 (schema)Zod schema defining the input parameters for the tool, including station, format, datum, threshold, date ranges, and year range.station: StationSchema, format: FormatSchema, datum: DpapiDatumSchema, threshold: ThresholdSchema, begin_date: z.string().optional().describe('Start date (YYYYMMDD format)'), end_date: z.string().optional().describe('End date (YYYYMMDD format)'), year_range: YearRangeSchema }).describe('Get high tide flooding annual count data');