Skip to main content
Glama
RyanCardin15

LocalTides MCP Server

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
NameRequiredDescriptionDefault
dateNoSpecific date (YYYYMMDD format)
datumNoDatum reference for DPAPI
formatNoOutput format (json, xml, csv)
stationYesStation ID
thresholdNoFlood threshold level

Implementation Reference

  • 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
      });
    }
  • 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');
  • 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');
        }
      }
    });

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-TidesAndCurrents-MCP'

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