get_high_tide_flooding_daily
Retrieve daily high tide flooding counts by station, specifying flood threshold, date range, and output format (json, xml, csv) for accurate coastal flood analysis.
Instructions
Get high tide flooding daily 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 | No | Year for analysis (YYYY format) |
Implementation Reference
- src/schemas/dpapi.ts:29-37 (schema)Zod schema defining the input parameters and validation for the get_high_tide_flooding_daily tool.export const HighTideFloodingDailySchema = z.object({ 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: YearSchema }).describe('Get high tide flooding daily count data');
- src/tools/derived-product-tools.ts:56-71 (registration)Registers the get_high_tide_flooding_daily tool with the FastMCP server, specifying name, description, input schema, and a thin execute handler that delegates to the DpapiService.server.addTool({ name: 'get_high_tide_flooding_daily', description: 'Get high tide flooding daily count data for a station', parameters: HighTideFloodingDailySchema, execute: async (params) => { try { const result = await dpapiService.getHighTideFloodingDaily(params); return JSON.stringify(result); } catch (error) { if (error instanceof Error) { throw new Error(`Failed to get high tide flooding daily data: ${error.message}`); } throw new Error('Failed to get high tide flooding daily data'); } } });
- src/services/dpapi-service.ts:82-95 (handler)Core handler in DpapiService that constructs the API request to NOAA's Derived Product API endpoint '/htf/daily' and fetches the high tide flooding daily data./** * Get high tide flooding daily count data * @param params Parameters including station ID, date range, and thresholds * @returns Daily flood count data */ async getHighTideFloodingDaily(params: Record<string, any>): Promise<any> { const { station, format = 'json', ...rest } = params; return this.fetchDpapi('/htf/daily', { station, format, ...rest }); }