Skip to main content
Glama
RyanCardin15

LocalTides MCP Server

get_water_levels

Retrieve accurate water level data for specific stations using NOAA Tides and Currents API. Specify station ID, date range, units, and output format for tailored results. Ideal for monitoring tidal patterns and coastal conditions.

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

  • Core handler function that fetches water level data from the NOAA API by adding the 'water_level' product parameter and calling fetchDataApi.
    async getWaterLevels(params: Record<string, any>): Promise<any> {
      return this.fetchDataApi({
        ...params,
        product: 'water_level'
      });
    }
  • Zod schema defining the input parameters and validation for the get_water_levels tool.
    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 in the MCP server class, including name, description, schema, and handler that delegates to NoaaService.
    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);
      }
    };
  • Alternative registration of the get_water_levels tool using FastMCP server.addTool, with inline schema and execute handler calling NoaaService.
    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');
        }
      }
    });
Behavior2/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure but offers minimal information. It doesn't mention whether this is a read-only operation, what permissions might be required, rate limits, or what the response format looks like. The description only states what data is retrieved, not how the tool behaves or any constraints on its use.

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 extremely concise at just 7 words: 'Get water level data for a station'. It's front-loaded with the core purpose and contains no unnecessary information. Every word serves a purpose in communicating the tool's function.

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 having 9 parameters, no annotations, and no output schema, the description is insufficiently complete. It doesn't help the agent understand what kind of water level data is returned (real-time measurements, historical data, predictions), how to interpret the results, or how this tool differs from the many similar sibling tools. For a data retrieval tool with numerous parameters and alternatives, 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 schema description coverage is 100%, with all 9 parameters well-documented in the input schema. The description doesn't add any parameter information beyond what's already in the schema, so it meets the baseline of 3. However, it doesn't compensate for any gaps since there are none in the schema documentation.

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 easy to understand what the tool does. However, it doesn't differentiate this tool from its many siblings (like get_extreme_water_levels, get_top_ten_water_levels, etc.), which would require more specificity about what type of water level data it retrieves.

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 the many sibling tools available. With 23 sibling tools including get_extreme_water_levels, get_tide_predictions, and get_current_predictions, the agent receives no help in selecting the appropriate water-level-related tool for different scenarios. There's no mention of alternatives or specific use cases.

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

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