Skip to main content
Glama

get_sea_level_trends

Retrieve sea level trends and error margins for specific stations using station ID and output in JSON, XML, or CSV formats. Ideal for analyzing NOAA Tides and Currents data.

Instructions

Get sea level trends and error margins for a station

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
affilNoStation affiliation (Global or US)
formatNoOutput format (json, xml, csv)
stationYesStation ID

Implementation Reference

  • Core handler function that fetches sea level trends data from the NOAA DPAPI by building parameters and calling the generic fetchDpapi method.
    async getSeaLevelTrends(params: Record<string, any>): Promise<any> { const { station, affil = 'Global', format = 'json', ...rest } = params; return this.fetchDpapi('/sltrends', { station, affil, format, ...rest }); }
  • Zod schema for input validation of the get_sea_level_trends tool parameters: station, affiliation (affil), and format.
    export const SeaLevelTrendsSchema = z.object({ station: StationSchema, affil: AffiliationSchema, format: FormatSchema }).describe('Get sea level trends for a station');
  • Registers the 'get_sea_level_trends' tool with the FastMCP server, specifying name, description, input schema, and an execute handler that calls the DpapiService and returns JSON stringified result.
    server.addTool({ name: 'get_sea_level_trends', description: 'Get sea level trends and error margins for a station', parameters: SeaLevelTrendsSchema, execute: async (params) => { try { const result = await dpapiService.getSeaLevelTrends(params); return JSON.stringify(result); } catch (error) { if (error instanceof Error) { throw new Error(`Failed to get sea level trends: ${error.message}`); } throw new Error('Failed to get sea level trends'); } } });

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