Skip to main content
Glama

get_high_tide_flooding_likelihoods

Analyze daily high tide flooding probabilities by station, flood threshold, and date. Choose output format (json, xml, csv) and datum reference to assess flood risks.

Instructions

Get high tide flooding daily likelihoods for a station

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
dateNoSpecific date (YYYYMMDD format)
datumNoDatum reference for DPAPI
formatNoOutput format (json, xml, csv)
stationYesStation ID
thresholdNoFlood threshold level

Implementation Reference

  • The tool's execute handler: thin wrapper that invokes the service method and returns JSON stringified result, with error handling.
    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'); } }
  • Zod schema defining input parameters for the tool: station, format, datum, threshold, 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');
  • Registration of the tool with the MCP server using server.addTool, including name, description, schema, and handler.
    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'); } } });
  • Supporting service method in DpapiService that performs the actual API fetch to the /htf/likelihoods endpoint.
    async getHighTideFloodingLikelihoods(params: Record<string, any>): Promise<any> { const { station, format = 'json', ...rest } = params; return this.fetchDpapi('/htf/likelihoods', { station, format, ...rest }); }

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/RyanCardin15/NOAA'

If you have feedback or need assistance with the MCP directory API, please join our Discord server