Water Get Readings
water_get_readingsGet the latest instantaneous (~15-min, real-time) values for USGS sites — per-site, per-parameter records with timestamp, value, unit, and provisional/approved qualifiers. Takes up to 500 site numbers, a full water_find_sites page, and reads the first 100 distinct ones; the rest return in deferredSites, in input order, to pass as sites in another call. Omitting parameterCd returns every parameter each site publishes. A site measuring one parameter with several sensors returns one series per sensor, each named by methodId (its time-series ID) and methodDescription; a sensor that reported nothing in the period still returns, with totalValues 0. At most 100 series return per call — every site that returned a series keeps at least one, and totalSeries reports how many the upstream returned; pass parameterCd or split the sites across calls to reach the rest. Each series returns only its 10 most recent records (totalValues reports the true count); truncated=true when either cap applied. Use water_get_series for a full date-range series. Sites read that return no series are listed in missingSites, not dropped silently. Find site numbers with water_find_sites; water_get_site_data_catalog lists the parameters and sensors a site measures and when each last reported.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"sites": "<sites>"
},
"name": "water_get_readings"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| sites | Yes | One or more USGS site numbers, at most 500. The first 100 distinct numbers are read, in input order; the rest return in deferredSites to pass as sites in another call. A repeated number is read once. | |
| period | No | ISO 8601 duration for the lookback period (e.g. "PT2H" = last 2 hours, "P1D" = last 1 day, "P7D" = last 7 days). Default: "PT2H" (last 2 hours of readings). Widening it raises totalValues, but each series still returns only its 10 most recent records — use water_get_series to retrieve a full series. At most 1,100 days (e.g. "P3Y"); a longer period is refused upstream. | PT2H |
| parameterCd | No | Parameter codes to return. Omit to get every parameter each site publishes — one series per site, parameter, and method, so a large batch can exceed the 100-series cap. Use water_list_parameters to discover codes. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| error | No | Present when the call failed. Absent on success. | |
| query | No | Query parameters used for this request. | |
| total | No | Number of site + parameter + method time series returned in readings (at most 100). | |
| readings | No | Time series per site + parameter + method combination, ordered by site number, parameter code, then the sensor's first observation. At most 100: past that, series are kept round-robin across sites — every site's first series, then every site's second — with a site's series carrying values ahead of its empty ones, a series whose every record is no data counting as empty. | |
| truncated | No | True when either cap applied. The series cap: totalSeries > total — pass parameterCd or split the sites across calls. The 10-record cap: some readings[].totalValues > values.length — use water_get_series for the full series. Sites not read do not set it; they return in deferredSites. | |
| totalSeries | No | Number of site + parameter + method time series before the 100-series cap. Greater than total exactly when the cap dropped series; narrow with parameterCd or split the sites across calls to get the rest. | |
| missingSites | No | Site numbers read in this call that returned no series, each listed once — the site does not exist, or has no instantaneous series of the requested parameter(s). A site whose sensor reported nothing in the period is not listed here: it returns a series with totalValues 0. A site not read is not listed here either: it returns in deferredSites. Empty when every site read returned a series. Check a listed site with water_get_site_data_catalog: not_found means no such site, an empty series list means it never measured the parameter, and each row’s endDate gives its last report. | |
| deferredSites | No | Distinct site numbers past the first 100 distinct in sites, in input order, each listed once — not read in this call. Pass them as sites in another call to read them. Empty when every site was read. |