Skip to main content
Glama
RyanCardin15

LocalTides MCP Server

get_stations

Retrieve a list of tide and current stations by specifying station type, output format, and unit preferences using the LocalTides MCP Server.

Instructions

Get list of stations

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
formatNoOutput format (json, xml)
typeNoStation type (waterlevels, currents, etc.)
unitsNoUnits to use ("english" or "metric")

Implementation Reference

  • Core handler function that implements the logic to retrieve NOAA stations list from the metadata API, processing parameters and constructing the API request.
    async getStations(params: Record<string, any>): Promise<any> {
      const { 
        type, 
        name, 
        lat_min, 
        lat_max, 
        lon_min, 
        lon_max, 
        state, 
        limit, 
        offset, 
        sort_by, 
        sort_order, 
        ...rest 
      } = params;
      
      const endpoint = '/stations.' + (rest.format || 'json');
      
      // Build query parameters with all the filters
      const queryParams: Record<string, any> = { ...rest };
      
      // Add filters only if they are defined
      if (type) queryParams.type = type;
      if (name) queryParams.name = name;
      if (lat_min !== undefined) queryParams.lat_min = lat_min;
      if (lat_max !== undefined) queryParams.lat_max = lat_max;
      if (lon_min !== undefined) queryParams.lon_min = lon_min;
      if (lon_max !== undefined) queryParams.lon_max = lon_max;
      if (state) queryParams.state = state;
      if (limit !== undefined) queryParams.limit = limit;
      if (offset !== undefined) queryParams.offset = offset;
      if (sort_by) queryParams.sort_by = sort_by;
      if (sort_order) queryParams.sort_order = sort_order;
      
      return this.fetchMetadataApi(endpoint, queryParams);
    }
  • Zod schema for validating input parameters to the get_stations tool.
    export const GetStationsSchema = z.object({
      type: z.string().optional().describe('Station type (waterlevels, currents, etc.)'),
      units: UnitsSchema,
      format: z.enum(['json', 'xml']).optional().describe('Output format (json, xml)'),
      name: z.string().optional().describe('Filter stations by name (partial match)'),
      lat_min: z.number().optional().describe('Minimum latitude boundary'),
      lat_max: z.number().optional().describe('Maximum latitude boundary'),
      lon_min: z.number().optional().describe('Minimum longitude boundary'),
      lon_max: z.number().optional().describe('Maximum longitude boundary'),
      state: z.string().optional().describe('Filter stations by state code (e.g., CA, NY)'),
      limit: z.number().optional().describe('Maximum number of stations to return'),
      offset: z.number().optional().describe('Number of stations to skip for pagination'),
      sort_by: z.enum(['name', 'id', 'state']).optional().describe('Field to sort results by'),
      sort_order: z.enum(['asc', 'desc']).optional().describe('Sort order (ascending or descending)'),
    });
  • Tool registration in MCP server: defines the MCPTool for get_stations including name, description, schema, and handler delegating to noaaService.
    const getStations: MCPTool = {
      name: "get_stations",
      description: "Get list of stations",
      inputSchema: GetStationsSchema,
      handler: async (params) => {
        return this.noaaService.getStations(params);
      }
    };
  • Alternative tool registration using FastMCP.addTool for get_stations, with inline schema and execute handler.
    server.addTool({
      name: 'get_stations',
      description: 'Get list of stations',
      parameters: z.object({
        type: z.string().optional().describe('Station type (waterlevels, currents, etc.)'),
        format: z.enum(['json', 'xml']).optional().describe('Output format (json, xml)'),
        units: UnitsSchema,
      }),
      execute: async (params) => {
        try {
          const result = await noaaService.getStations(params);
          return JSON.stringify(result);
        } catch (error) {
          if (error instanceof Error) {
            throw new Error(`Failed to get stations: ${error.message}`);
          }
          throw new Error('Failed to get stations');
        }
      }
    });
Behavior2/5

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

With no annotations provided, the description carries full burden but only states the basic action without disclosing behavioral traits like whether this is a read-only operation, if it requires authentication, rate limits, pagination, or what the output looks like. It's minimally informative for a tool with no annotation coverage.

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 with just three words, front-loaded with the core action. There's zero wasted language, though this conciseness comes at the cost of completeness.

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?

For a tool with 3 parameters, no annotations, and no output schema, the description is inadequate. It doesn't explain what 'stations' refers to, what data is returned, or how to interpret results. Given the complexity and lack of structured information, 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?

Schema description coverage is 100%, so the schema fully documents all three parameters (format, type, units). The description adds no parameter information beyond what's in the schema, meeting the baseline of 3 when the schema does the heavy lifting.

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

Purpose3/5

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

The description 'Get list of stations' states the basic action (get) and resource (stations), but it's vague about scope and doesn't differentiate from sibling tools like 'get_station_details' or 'get_water_levels'. It lacks specificity about what kind of stations or what information is returned.

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?

No guidance is provided about when to use this tool versus alternatives like 'get_station_details' (for specific station info) or 'get_water_levels' (for water level data at stations). The description offers no context about appropriate use cases or exclusions.

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