# QWeather Tide API MCP

> QWeather Ocean/Tide API gives your AI agent access to real-time, global oceanographic data. It retrieves comprehensive tide tables, pinpoints high and low water peaks by coordinates, and provides detailed metadata needed for marine research or coastal planning. Use it when you need precise water level metrics, not just general weather forecasts.

## Overview
- **Category:** data-analytics
- **Price:** Free
- **Tags:** tide-data, oceanography, maritime-data, water-levels, environmental-monitoring, api-integration

## Description

Yo. This QWeather Tide API gives your AI agent direct access to global oceanographic data. You don't wanna manually check some bunch of maritime websites; you just let your agent pull the numbers straight up. 

Before running any big request, you gotta run `check_api_status`. That tool runs a quick confirmation check to make sure the QWeather Ocean service is actually live and ready for data requests. It validates the API's operational status before you waste time on major queries.

The core function lives in `get_ocean_tide_data`. This tool lets your agent pull real-time tide tables, pinpointing high and low water peaks using a specific location ID and date. You can feed it a location ID and a date to get a complete, timestamped schedule of what the water levels are doing at that spot. It doesn't just give you average numbers; it maps out the entire cycle.

When you need highly granular data, `get_ocean_tide_data` accepts coordinates too. You can feed it latitude and longitude to run a localized audit on the water level changes for any specific region. This means you get precise metrics whether your target is defined by an established location ID or by raw geographic markers.

The tool identifies high tide—the absolute peak time and height when the ocean swells up highest—and low tide, flagging those exact times and heights too. It handles both types of peaks within the same data pull, letting you map out temporal patterns for coastal planning or deep marine research.

When your agent pulls this data, it gives you a complete picture: the initial service status confirmation, followed by the full tide table retrieval, and finally, the detailed breakdown of every high and low water event. You get precise metrics that go way beyond general weather forecasts. It's all about specific water level measurements. Your agent handles the complexity; you just ask for the data.

## Tools

### check_api_status
Runs a quick check to confirm the QWeather Ocean service is currently operational and ready for requests.

### get_ocean_tide_data
Retrieves real-time tide tables, including high/low peaks, for a specific location ID and date.

## Prompt Examples

**Prompt:** 
```
Get tide data for location '101010100' (Shanghai) for '20240510' using QWeather.
```

**Response:** 
```
I've retrieved the tide table for Shanghai! Notable peaks include a High Tide at 11:30 AM (3.5m) and a Low Tide at 5:45 PM (0.8m). Would you like the hourly water level metadata for this location?
```

**Prompt:** 
```
What is the tide forecast for latitude 22.3193 and longitude 114.1694 (Hong Kong)?
```

**Response:** 
```
I've retrieved the real-time tide data for those coordinates! Multiple water level peaks are identified for today. I can provide the exact height and peak type metadata to assist in your maritime audit.
```

**Prompt:** 
```
Show the full tide table for today.
```

**Response:** 
```
I've retrieved the complete tide table for your selected location! It includes timestamped entries for all water level changes throughout the day. I can assist you with an audit of the most significant peaks if you'd like.
```

## Capabilities

### Retrieve Tide Tables
Gets a complete, timestamped schedule of water levels for a specific geographic location and date.

### Audit Water Peaks
Identifies the precise times and heights when the tide reaches its highest (high tide) or lowest (low tide) point.

### Query by Coordinates
Retrieves water level data using latitude and longitude, allowing for highly specific regional audits.

### Check Service Status
Validates the live operational status of the QWeather API before running any major data requests.

## Use Cases

### Planning a deep-sea survey route
The survey team needs to know when the water is deepest. They ask their agent: 'What's the tide forecast for coordinates 34.05, -118.24 on June 1st?' The agent uses `get_ocean_tide_data` and reports back a clear schedule of high-water peaks, allowing them to adjust their route accordingly.

### Auditing port expansion logistics
The planner needs to know if the current tide levels are sufficient for crane operation. They first run `check_api_status` to confirm service health, then use `get_ocean_tide_data` with a specific location ID to confirm minimum water height requirements.

### Investigating historical flooding patterns
A researcher wants to compare current data against past records. They use the API's ability to query by date in `get_ocean_tide_data` to build a comprehensive, time-stamped dataset for their paper.

### Emergency response coordination
An operations lead needs immediate water level data during an event. They prompt: 'Check the tide status at this harbor immediately.' The agent uses `check_api_status` and then calls `get_ocean_tide_data` to give a rapid, reliable assessment.

## Benefits

- Pinpoint high and low water events instantly. By querying the data with `get_ocean_tide_data`, you get the exact height and time of every peak, which is critical for logistics planning.
- Verify service uptime first. Running `check_api_status` before making a complex query saves time and prevents workflow failures when external services are down.
- Stay focused on data, not dashboards. Instead of clicking through multiple tabs to find tide charts, your agent handles the location ID lookup and data retrieval in one go.
- Model regional changes with precision. You can pass coordinates directly into `get_ocean_tide_data`, allowing you to audit specific sections of coastline that matter for development.
- Process complex time series easily. The API returns full tide tables, giving you timestamped entries for every water level change throughout the entire day.

## How It Works

The bottom line is: you confirm system health, then you get the precise environmental numbers.

1. Subscribe to the server and input your unique QWeather API Key.
2. Your AI client calls `check_api_status` first. This confirms the service is online and ready for use.
3. The agent then uses `get_ocean_tide_data`, passing the required location coordinates/ID and date to pull the actual water level data.

## Frequently Asked Questions

**How do I make sure the QWeather Ocean/Tide API is working before I run a query?**
You use the `check_api_status` tool. This runs an immediate, lightweight check to confirm the service is operational. Always call this first; it saves you time if the API is down.

**Does `get_ocean_tide_data` support coordinates or just location IDs?**
It supports both. You can pass either a specific Location ID or precise geographic coordinates (latitude/longitude) to get data for the correct spot.

**What kind of water level information does `get_ocean_tide_data` provide?**
It provides full tide tables, which means you get timestamped entries for all water level changes throughout the day. You can pinpoint high and low peaks.

**If I need data from next month, can `get_ocean_tide_data` handle it?**
Yes, as long as you provide a valid future date in your request parameters, the tool will retrieve the predicted tide tables for that time.

**How does using `get_ocean_tide_data` handle API key management for my AI client?**
You must provide your QWeather API Key during server setup. The agent uses this key to authorize every request, ensuring data integrity and tracking usage against the account limits you configured.

**If I run complex queries with `get_ocean_tide_data` repeatedly, are there rate limits?**
Yes, the service enforces standard API rate limits. If your agent exceeds the allowed calls per minute or day, subsequent requests will fail with a specific error code. You'll need to check your QWeather account dashboard for current quotas.

**What structured format does `get_ocean_tide_data` return so my AI client can use it?**
The tool returns all data as standardized JSON objects. This structure makes the water level metrics, timestamps, and peak information immediately consumable by your agent's logic for scripting or further analysis.

**Beyond specific dates, what generalized oceanographic metadata does `get_ocean_tide_data` access?**
The API provides detailed oceanographic metadata alongside tide tables. This helps you perform deep-dive coastal classification and understand broader regional trends that aren't tied to a single day's water level reading.

**How do I find my QWeather API Key?**
Log in to your [**QWeather Developer portal**](https://dev.qweather.com/), create a project, and you will find your API Key in your dashboard. Copy and paste it below.

**Does it support coordinate search?**
Yes. You can provide location coordinates (lat,lon) to the `get_ocean_tide_data` tool to retrieve precise regional tide metadata.

**What data format is returned for tide tables?**
The API returns detailed hourly or daily tide tables, including timestamped water height and peak type metadata.