Skip to main content
Glama
RyanCardin15

noaa-tidesandcurrents-mcp

get_top_ten_water_levels

Retrieve the top ten highest or lowest water levels for a NOAA tide station, specifying output format, units, and datum reference for analysis.

Instructions

Get top ten highest or lowest water levels for a station

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
analysis_typeNoAnalysis type (highest or lowest)
datumNoDatum reference for DPAPI
formatNoOutput format (json, xml, csv)
stationYesStation ID
unitsNoUnits to use ("english" or "metric")

Implementation Reference

  • The execute handler function for the 'get_top_ten_water_levels' tool. It calls the DpapiService.getTopTenWaterLevels method with the input params, stringifies the result, and handles errors by throwing descriptive messages.
    execute: async (params) => {
      try {
        const result = await dpapiService.getTopTenWaterLevels(params);
        return JSON.stringify(result);
      } catch (error) {
        if (error instanceof Error) {
          throw new Error(`Failed to get top ten water levels: ${error.message}`);
        }
        throw new Error('Failed to get top ten water levels');
      }
  • Zod schema defining the input parameters for the 'get_top_ten_water_levels' tool, including required station, format, datum, units, and optional analysis_type.
    export const TopTenWaterLevelsSchema = z.object({
      station: StationSchema,
      format: FormatSchema,
      datum: DpapiDatumSchema,
      units: UnitsSchema,
      analysis_type: z.enum(['highest', 'lowest']).optional().describe('Analysis type (highest or lowest)')
    }).describe('Get top ten water levels for a station');
  • Registration of the 'get_top_ten_water_levels' tool via server.addTool within the registerDerivedProductTools function.
    server.addTool({
      name: 'get_top_ten_water_levels',
      description: 'Get top ten highest or lowest water levels for a station',
      parameters: TopTenWaterLevelsSchema,
      execute: async (params) => {
        try {
          const result = await dpapiService.getTopTenWaterLevels(params);
          return JSON.stringify(result);
        } catch (error) {
          if (error instanceof Error) {
            throw new Error(`Failed to get top ten water levels: ${error.message}`);
          }
          throw new Error('Failed to get top ten water levels');
        }
      }
    });
  • Helper method in DpapiService that prepares parameters and fetches data from the NOAA DPAPI /topten endpoint to get top ten water levels.
    async getTopTenWaterLevels(params: Record<string, any>): Promise<any> {
      const { station, format = 'json', ...rest } = params;
      
      return this.fetchDpapi('/topten', {
        station,
        format,
        ...rest
      });
    }
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 ('Get'), implying a read-only operation, but doesn't disclose any behavioral traits such as rate limits, authentication needs, error handling, or what the output looks like (e.g., format details beyond parameters). For a tool with no annotations, this is a significant gap in transparency.

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, efficient sentence that front-loads the core purpose without any wasted words. It's appropriately sized for the tool's complexity, 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.

Completeness3/5

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

Given the tool's moderate complexity (5 parameters, no output schema, no annotations), the description is minimally adequate. It states what the tool does but lacks details on behavioral context, output format implications, or differentiation from siblings. With no output schema, the description doesn't explain return values, which is a gap, but the high schema coverage helps offset this somewhat.

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 input schema has 100% description coverage, with all parameters well-documented in the schema itself (e.g., 'analysis_type' as 'highest or lowest', 'datum' as 'Datum reference for DPAPI'). The description adds no additional meaning beyond what the schema provides, such as explaining parameter interactions or usage examples. With high schema coverage, the baseline score of 3 is appropriate.

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 top ten highest or lowest water levels for a station'. It specifies the verb ('Get'), resource ('water levels'), and scope ('top ten highest or lowest', 'for a station'). However, it doesn't explicitly distinguish this tool from sibling tools like 'get_extreme_water_levels' or 'get_water_levels', which likely serve similar purposes, so it doesn't reach the highest score.

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. It doesn't mention sibling tools like 'get_extreme_water_levels' or 'get_water_levels', nor does it specify any prerequisites, exclusions, or contextual cues for selection. This leaves the agent without clear usage instructions.

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