Skip to main content
Glama
RyanCardin15

noaa-tidesandcurrents-mcp

get_water_levels

Retrieve water level data for a specific NOAA station using station ID, date range, time zone, and output format. Supports custom parameters like datum and units for accurate results.

Instructions

Get water level data for a station

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
begin_dateNoStart date (YYYYMMDD or MM/DD/YYYY)
dateNoDate to retrieve data for ("today", "latest", "recent", or specific date)
datumNoDatum to use (MLLW, MSL, etc.)
end_dateNoEnd date (YYYYMMDD or MM/DD/YYYY)
formatNoOutput format (json, xml, csv)
rangeNoNumber of hours to retrieve data for
stationYesStation ID
time_zoneNoTime zone (gmt, lst, lst_ldt)
unitsNoUnits to use ("english" or "metric")

Implementation Reference

  • The core handler function that implements the logic for fetching water levels from the NOAA API by setting product: 'water_level' and calling fetchDataApi.
    async getWaterLevels(params: Record<string, any>): Promise<any> {
      return this.fetchDataApi({
        ...params,
        product: 'water_level'
      });
    }
  • Zod schema defining the input parameters for the get_water_levels tool, including validation refinement for date parameters.
    export const GetWaterLevelsSchema = z.object({
      station: StationSchema,
      date: DateSchema,
      begin_date: BeginDateSchema,
      end_date: EndDateSchema,
      range: RangeSchema,
      datum: DatumSchema,
      units: UnitsSchema,
      time_zone: TimeZoneSchema,
      format: FormatSchema,
    }).refine(
      data => (data.date || (data.begin_date && data.end_date) || (data.begin_date && data.range) || (data.end_date && data.range) || data.range),
      { message: "You must provide either 'date', 'begin_date' and 'end_date', 'begin_date' and 'range', 'end_date' and 'range', or just 'range'" }
    );
  • Registration of the get_water_levels tool using FastMCP server.addTool, including inline schema and execute handler that wraps noaaService.getWaterLevels.
    server.addTool({
      name: 'get_water_levels',
      description: 'Get water level data for a station',
      parameters: z.object({
        station: StationSchema,
        date: DateSchema,
        begin_date: BeginDateSchema,
        end_date: EndDateSchema,
        range: RangeSchema,
        datum: DatumSchema,
        units: UnitsSchema,
        time_zone: TimeZoneSchema,
        format: FormatSchema,
      }).refine(refineDateParams, { message: dateRefinementMessage }),
      execute: async (params) => {
        try {
          const result = await noaaService.getWaterLevels(params);
          return JSON.stringify(result);
        } catch (error) {
          if (error instanceof Error) {
            throw new Error(`Failed to get water levels: ${error.message}`);
          }
          throw new Error('Failed to get water levels');
        }
      }
    });
  • Definition and registration of the get_water_levels MCPTool in McpServer class, using GetWaterLevelsSchema and handler wrapping noaaService.getWaterLevels.
    const getWaterLevels: MCPTool = {
      name: "get_water_levels",
      description: "Get water level data for a station",
      inputSchema: GetWaterLevelsSchema,
      handler: async (params) => {
        return this.noaaService.getWaterLevels(params);
      }
    };
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full burden of behavioral disclosure. It states the tool retrieves data but doesn't mention any behavioral traits such as rate limits, authentication requirements, data freshness, or potential side effects. For a data retrieval tool with no annotation coverage, this leaves significant gaps in understanding how the tool behaves in practice.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, clear sentence with no wasted words. It is appropriately sized and front-loaded, directly stating the tool's purpose without unnecessary elaboration, making it easy for an agent to parse quickly.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the complexity of 9 parameters, no annotations, and no output schema, the description is incomplete. It doesn't explain what the returned water level data looks like (e.g., structure, units), how to handle multiple parameters like 'date' vs. 'begin_date/end_date', or any constraints on usage. For a tool with rich parameters but no structured output documentation, more context is needed.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The description adds no parameter semantics beyond what's in the input schema, which has 100% coverage with detailed descriptions for all 9 parameters. Since the schema already fully documents parameters like 'station', 'date', and 'format', the description provides no additional value here, meeting the baseline score of 3 for high schema coverage.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's purpose: 'Get water level data for a station'. It specifies the verb ('Get') and resource ('water level data'), making it understandable. However, it doesn't differentiate from sibling tools like 'get_extreme_water_levels' or 'get_top_ten_water_levels', which appear to retrieve similar water level data with different scopes or filters.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives. With many sibling tools related to water levels (e.g., 'get_extreme_water_levels', 'get_top_ten_water_levels'), there is no indication of how this general water level data retrieval differs from those more specific tools, leaving the agent to guess based on tool names alone.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

Related Tools

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