Skip to main content
Glama
ravinahp
by ravinahp

get_tides

Retrieve tide information for a specific location and date by providing latitude, longitude, and date to access detailed tide data including high/low tides and station details.

Instructions

Get tide information for a specific location and date.

Args: latitude: Float value representing the location's latitude longitude: Float value representing the location's longitude date: Date string in YYYY-MM-DD format Returns: Formatted string containing tide information and station details

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
latitudeYes
longitudeYes
dateYes

Implementation Reference

  • The handler function for the 'get_tides' tool. It is registered via the @mcp.tool() decorator and executes the tool logic by delegating to StormGlassAPI.
    @mcp.tool() async def get_tides(latitude: float, longitude: float, date: str) -> str: """Get tide information for a specific location and date. Args: latitude: Float value representing the location's latitude longitude: Float value representing the location's longitude date: Date string in YYYY-MM-DD format Returns: Formatted string containing tide information and station details """ return await api.get_tide_data(latitude, longitude, date)
  • Supporting utility in StormGlassAPI class that performs the actual API request to retrieve tide data, formats parameters, handles the HTTP call, and returns formatted tide information.
    async def get_tide_data(self, latitude: float, longitude: float, date: str) -> str: """Get tide information for a specific location and date.""" url = f"{self.api_base}/tide/extremes/point" params = { "lat": latitude, "lng": longitude, "start": f"{date}T00:00:00Z", "end": f"{date}T23:59:59Z" } param_string = "&".join(f"{k}={v}" for k, v in params.items()) full_url = f"{url}?{param_string}" data = await self.make_request(full_url) if not data: return "Unable to fetch tide data for this location." return self.format_tide_data(data)
  • Execution of the MCP server, making the registered 'get_tides' tool available via stdio transport.
    mcp.run(transport='stdio')

Other 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/ravinahp/surf-mcp'

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