get_high_tide_flooding_likelihoods
Retrieve daily high tide flooding likelihoods for a specific station using station ID, date, and threshold level. Supports output in JSON, XML, or CSV formats for analysis and planning.
Instructions
Get high tide flooding daily likelihoods for a station
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| date | No | Specific date (YYYYMMDD format) | |
| datum | No | Datum reference for DPAPI | |
| format | No | Output format (json, xml, csv) | |
| station | Yes | Station ID | |
| threshold | No | Flood threshold level |
Implementation Reference
- src/services/dpapi-service.ts:163-171 (handler)The core handler function that fetches high tide flooding likelihoods data from the NOAA DPAPI endpoint '/htf/likelihoods' using the service's fetchDpapi method.async getHighTideFloodingLikelihoods(params: Record<string, any>): Promise<any> { const { station, format = 'json', ...rest } = params; return this.fetchDpapi('/htf/likelihoods', { station, format, ...rest }); }
- src/schemas/dpapi.ts:84-90 (schema)Zod schema defining the input parameters for the get_high_tide_flooding_likelihoods tool, including station, format, datum, threshold, and optional date.export const HighTideFloodingLikelihoodsSchema = z.object({ station: StationSchema, format: FormatSchema, datum: DpapiDatumSchema, threshold: ThresholdSchema, date: z.string().optional().describe('Specific date (YYYYMMDD format)') }).describe('Get high tide flooding daily likelihoods');
- src/tools/derived-product-tools.ts:146-161 (registration)Registration of the MCP tool 'get_high_tide_flooding_likelihoods' using server.addTool, which delegates to the DpapiService handler and uses the corresponding schema.server.addTool({ name: 'get_high_tide_flooding_likelihoods', description: 'Get high tide flooding daily likelihoods for a station', parameters: HighTideFloodingLikelihoodsSchema, execute: async (params) => { try { const result = await dpapiService.getHighTideFloodingLikelihoods(params); return JSON.stringify(result); } catch (error) { if (error instanceof Error) { throw new Error(`Failed to get high tide flooding likelihoods: ${error.message}`); } throw new Error('Failed to get high tide flooding likelihoods'); } } });