get_high_tide_flooding_projections
Project future high tide flooding events by analyzing sea level rise scenarios, station data, and flood thresholds using NOAA Tides and Currents API. Choose output formats like JSON, XML, or CSV for detailed insights.
Instructions
Get high tide flooding decadal projections for sea level rise scenarios
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| datum | No | Datum reference for DPAPI | |
| decade | No | Decade for projections (e.g., "2050") | |
| format | No | Output format (json, xml, csv) | |
| scenario | No | Sea level rise scenario | |
| station | Yes | Station ID | |
| threshold | No | Flood threshold level |
Implementation Reference
- src/tools/derived-product-tools.ts:128-143 (registration)Registers the get_high_tide_flooding_projections MCP tool with FastMCP server.addTool, providing name, description, input parameters schema, and an execute handler that calls the DpapiService and returns JSON stringified result.server.addTool({ name: 'get_high_tide_flooding_projections', description: 'Get high tide flooding decadal projections for sea level rise scenarios', parameters: HighTideFloodingProjectionsSchema, execute: async (params) => { try { const result = await dpapiService.getHighTideFloodingProjections(params); return JSON.stringify(result); } catch (error) { if (error instanceof Error) { throw new Error(`Failed to get high tide flooding projections: ${error.message}`); } throw new Error('Failed to get high tide flooding projections'); } } });
- src/schemas/dpapi.ts:74-81 (schema)Zod schema defining the input parameters for the get_high_tide_flooding_projections tool, including station, format, scenario, datum, threshold, and decade.export const HighTideFloodingProjectionsSchema = z.object({ station: StationSchema, format: FormatSchema, scenario: ScenarioSchema, datum: DpapiDatumSchema, threshold: ThresholdSchema, decade: DecadeSchema }).describe('Get high tide flooding decadal projections');
- DpapiService helper method implementing the core logic: extracts parameters and calls NOAA DPAPI endpoint '/htf/projections' via fetchDpapi to retrieve high tide flooding projections data.async getHighTideFloodingProjections(params: Record<string, any>): Promise<any> { const { station, scenario = 'all', format = 'json', ...rest } = params; return this.fetchDpapi('/htf/projections', { station, scenario, format, ...rest }); }