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". 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.1/5.0
Behavior4/5

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

Annotations already declare readOnlyHint, idempotentHint, and destructiveHint, so the safety profile is covered. The description adds meaningful behavioral context beyond those annotations: values are server-computed, period boundaries should use the user's local timezone rather than UTC midnight, and the response includes the converted value and unit per period. This is valuable, non-redundant information.

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?

The description is composed of four focused sentences plus a concrete JSON example. The core action and the important timezone caveat are front-loaded, and the example earns its place by showing how parameters combine. It is slightly long due to the example but contains no fluff or redundant restatement.

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

Completeness4/5

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

For an 8-parameter tool with a fully documented input schema and an output schema present, the description is largely complete: it explains the aggregation behavior, the timezone handling, response contents, and use cases. Details like maxItems and dataset_id are already covered by the schema, so nothing critical is missing. It could mention more explicit limitations, but overall it is self-sufficient.

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?

Since schema description coverage is 100%, every parameter is already documented at a baseline level. The description adds a concrete example payload and clarifies the timezone semantics of period boundaries, but it does not introduce new parameter-level guidance beyond what the schema provides. Baseline 3 is appropriate.

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?

The description uses a specific verb ('Aggregate'), a clear resource (weather variable), and a well-defined scope (one or more time periods). It distinguishes itself from siblings by emphasizing server-computed totals/maxima/minima/averages and giving concrete example questions like 'total rainfall today and tomorrow' and 'peak wind speed this weekend', making its unique role immediately clear.

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

Usage Guidelines4/5

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

The description provides clear context for when to use this tool: when aggregating a variable over time periods, when local timezone boundaries matter, and when the user wants a single place name as input. It includes ideal-use examples but does not explicitly name alternatives or state when not to use it, so it falls short of a 5.

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.