Skip to main content
Glama

Get period totals

get_period_totals
Read-onlyIdempotent

Aggregate a weather variable over one or more time periods. Returns server-computed totals, maxima, minima, or averages per period. Period start/end times should use the user's local timezone boundaries (not UTC midnight). Response includes the converted value and unit per period. Ideal for questions like "total rainfall today and tomorrow" or "peak wind speed this weekend". For rain that already fell, use get_observed_precipitation. Accepts a place name directly. Example: {"location": "Portland, OR", "variable": "precipitation", "aggregation": "sum", "periods": [{"start": "2026-07-08T07:00:00Z", "end": "2026-07-09T07:00:00Z", "label": "Today"}]}.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
latNoLatitude in decimal degrees (-90 to 90). Most tools also accept a `location` place-name string instead of lat/lon.
lonNoLongitude in decimal degrees (-180 to 180). For continental US use negative values (west of the prime meridian).
unitsNoUnit system for all values in the request and response: imperial (°F, mph, inches), metric (°C, km/h, mm), or si (K, m/s, mm). Defaults to imperial.imperial
periodsYesTime periods to aggregate over (1-14).
locationNoFree-text place: city ("Denver"), city+state ("Portland, OR"), US ZIP ("50219"), or "lat,lon" ("39.74,-104.99"). Provide either this OR explicit lat+lon, not both.
variableYesStandard variable name (e.g. precipitation, snowfall, temperature_2m, wind_speed_10m, cape).
dataset_idNoDataset override. Default: auto-resolved NBM for the location.
aggregationNoAggregation function. Default sum. Use sum for precipitation/snowfall, max for temperature/wind, min for low temperatures, avg for humidity/cloud cover.sum

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
messageNo
periodsYes
locationYes
variableYes
aggregationYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.6/5.0
Behavior4/5

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

Annotations already declare readOnlyHint, idempotentHint, openWorldHint, and destructiveHint=false, so the safety profile is covered. The description adds genuinely non-structured behavior: periods must use the user's local timezone boundaries rather than UTC midnight, and the response includes a converted value and unit per period. It stops short of covering failure modes or rate limits, so it earns a 4 rather than 5.

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?

Front-loaded with purpose, then routing guidance, then the timezone caveat, then the example. Every sentence carries information, though the inline JSON example makes the block longer than strictly needed since the schema already defines the shape.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

With an output schema present, return values need no further explanation, and the description still notes the per-period value/unit response. Combined with the timezone convention, the sibling routing, and the input example, an agent has everything needed to call this correctly for an 8-parameter tool.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the baseline is 3, but the description adds real semantics beyond the schema: the local-timezone boundary rule for period start/end (the schema only says 'ISO 8601'), a worked example payload, and the note that a place name is accepted directly. These reduce the chance of malformed period timestamps, which the schema alone would not prevent.

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

Purpose5/5

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

States a specific verb and resource ('Aggregate a weather variable over one or more time periods') and immediately clarifies the computed outputs (totals, maxima, minima, averages) plus the per-period response shape. It explicitly names a sibling it must not be confused with ('For rain that already fell, use get_observed_precipitation'), so an agent can select it without opening sibling schemas.

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

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Gives concrete usage contexts ('total rainfall today and tomorrow', 'peak wind speed this weekend') and an explicit exclusion routing to get_observed_precipitation for past rainfall. The distinction between this tool (aggregation over periods) and the observational alternative is stated rather than inferred.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.