Skip to main content
Glama
RyanCardin15

noaa-tidesandcurrents-mcp

get_current_predictions

Retrieve real-time tide and current predictions for specific stations using NOAA Tides and Currents API. Specify station ID, date range, interval, units, and time zone to fetch data in JSON, XML, or CSV format.

Instructions

Get current predictions

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
begin_dateNoStart date (YYYYMMDD or MM/DD/YYYY)
binNoBin number
dateNoDate to retrieve data for ("today", "latest", "recent", or specific date)
end_dateNoEnd date (YYYYMMDD or MM/DD/YYYY)
formatNoOutput format (json, xml, csv)
intervalNoInterval (MAX_SLACK or a number for minutes)
rangeNoNumber of hours to retrieve data for
stationYesStation ID
time_zoneNoTime zone (gmt, lst, lst_ldt)
unitsNoUnits to use ("english" or "metric")
vel_typeNoVelocity type (speed_dir or default)

Implementation Reference

  • Core handler function in NoaaService that executes the NOAA API call for current predictions by setting product to 'currents_predictions' and delegating to fetchDataApi.
    async getCurrentPredictions(params: Record<string, any>): Promise<any> {
      return this.fetchDataApi({
        ...params,
        product: 'currents_predictions'
      });
    }
  • Zod input schema for the get_current_predictions tool, validating parameters like station, date ranges, bin, interval, with refinement ensuring date parameters are provided.
    export const GetCurrentPredictionsSchema = z.object({
      station: StationSchema,
      date: DateSchema,
      begin_date: BeginDateSchema,
      end_date: EndDateSchema,
      range: RangeSchema,
      bin: BinSchema,
      interval: z.string().optional().describe('Interval (MAX_SLACK or a number for minutes)'),
      vel_type: z.enum(['speed_dir', 'default']).optional().describe('Velocity type (speed_dir or default)'),
      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'" }
    );
  • Tool registration in McpServer class: defines the MCPTool object for get_current_predictions, including name, description, input schema, and handler that calls NoaaService.getCurrentPredictions.
    const getCurrentPredictions: MCPTool = {
      name: "get_current_predictions",
      description: "Get current predictions",
      inputSchema: GetCurrentPredictionsSchema,
      handler: async (params) => {
        return this.noaaService.getCurrentPredictions(params);
      }
    };
  • Alternative tool registration using FastMCP server.addTool for get_current_predictions, with inline Zod parameters schema and execute function that calls NoaaService and stringifies result.
    server.addTool({
      name: 'get_current_predictions',
      description: 'Get current predictions',
      parameters: z.object({
        station: StationSchema,
        date: DateSchema,
        begin_date: BeginDateSchema,
        end_date: EndDateSchema,
        range: RangeSchema,
        bin: BinSchema,
        interval: z.string().optional().describe('Interval (MAX_SLACK or a number for minutes)'),
        vel_type: z.enum(['speed_dir', 'default']).optional().describe('Velocity type (speed_dir or default)'),
        units: UnitsSchema,
        time_zone: TimeZoneSchema,
        format: FormatSchema,
      }).refine(refineDateParams, { message: dateRefinementMessage }),
      execute: async (params) => {
        try {
          const result = await noaaService.getCurrentPredictions(params);
          return JSON.stringify(result);
        } catch (error) {
          if (error instanceof Error) {
            throw new Error(`Failed to get current predictions: ${error.message}`);
          }
          throw new Error('Failed to get current predictions');
        }
      }
    });
Behavior1/5

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

No annotations are provided, so the description carries full burden for behavioral disclosure. It only states the action ('Get') without any details on permissions, rate limits, response format, pagination, or error handling. For a tool with 11 parameters and no output schema, 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.

Conciseness4/5

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

The description is extremely concise with just three words, which is efficient and front-loaded. However, it's arguably under-specified rather than optimally concise, as it lacks necessary detail for such a complex tool, but it doesn't waste words.

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 (11 parameters, no output schema, no annotations) and rich sibling context, the description is incomplete. It doesn't explain what 'predictions' entail, the return values, or behavioral aspects. The high parameter coverage in the schema helps, but the description fails to provide essential context for effective tool use.

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 parameters well-documented in the input schema (e.g., descriptions for 'date', 'format', 'units'). The description adds no additional parameter information beyond what's in the schema, so it meets the baseline of 3 for high coverage without extra value.

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

Purpose2/5

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

The description 'Get current predictions' is essentially a tautology of the tool name 'get_current_predictions'. It doesn't specify what type of predictions (e.g., tide, water level, weather) or for what resource, making it vague. While it distinguishes from some siblings like 'get_stations', it doesn't clarify how it differs from similar tools like 'get_tide_predictions' or 'get_water_levels'.

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

Usage Guidelines1/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 (e.g., 'get_tide_predictions', 'get_water_levels', 'get_currents'), there's no indication of context, prerequisites, or exclusions. This leaves the agent guessing about the appropriate use case.

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