Skip to main content
Glama

get_extreme_water_levels

Retrieve extreme water levels and exceedance probabilities for a specified station in JSON, XML, or CSV format using the LocalTides MCP Server. Supports both English and metric units.

Instructions

Get extreme water levels and exceedance probabilities for a station

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
formatNoOutput format (json, xml, csv)
stationYesStation ID
unitsNoUnits to use ("english" or "metric")

Implementation Reference

  • Registration of the 'get_extreme_water_levels' tool using server.addTool, including name, description, parameters schema, and execute handler.
    server.addTool({ name: 'get_extreme_water_levels', description: 'Get extreme water levels and exceedance probabilities for a station', parameters: ExtremeWaterLevelsSchema, execute: async (params) => { try { const result = await dpapiService.getExtremeWaterLevels(params); return JSON.stringify(result); } catch (error) { if (error instanceof Error) { throw new Error(`Failed to get extreme water levels: ${error.message}`); } throw new Error('Failed to get extreme water levels'); } } });
  • The execute handler function for the tool, which delegates to the DPAPI service and handles errors.
    execute: async (params) => { try { const result = await dpapiService.getExtremeWaterLevels(params); return JSON.stringify(result); } catch (error) { if (error instanceof Error) { throw new Error(`Failed to get extreme water levels: ${error.message}`); } throw new Error('Failed to get extreme water levels'); } }
  • Zod schema defining the input parameters for the get_extreme_water_levels tool: station, units, and format.
    export const ExtremeWaterLevelsSchema = z.object({ station: StationSchema, units: UnitsSchema, format: FormatSchema }).describe('Get extreme water levels for a station');
  • Helper method in DpapiService that constructs the API request to NOAA's /ewl endpoint for extreme water levels data.
    async getExtremeWaterLevels(params: Record<string, any>): Promise<any> { const { station, units = 'english', format = 'json', ...rest } = params; return this.fetchDpapi('/ewl', { station, units, 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-TidesAndCurrents-MCP'

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