Skip to main content
Glama

query_context

Fetch weather, pollen, or air quality data for a chosen field and inclusive date range to add environmental context to Garmin archive analysis.

Instructions

Query external context data (weather, pollen, air quality) for one field over a date range. Use query_health for Garmin body data (heart rate, sleep, stress, ...) instead; call list_available_fields first if the exact field name is unknown.

field: a context field name (e.g. "temperature_max", "pollen_grass_series"), or a category name — "weather", "pollen" or "air" — to get the main fields of that category at once. A "_series" suffix means intraday timeseries data; a plain name means one value per day. date_from/date_to: ISO "YYYY-MM-DD", inclusive. resolution is accepted but ignored — the field name alone decides the shape.

Unknown or ambiguous field names return an "error", often with a "did_you_mean" list of candidates. A clear typo or alias is resolved automatically; _meta.field_resolved_from / field_used then show what was substituted. A field with no data in the range returns empty values, not an error.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
fieldYes
date_toYes
date_fromYes
resolutionNodaily

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A5/5.0
Behavior5/5

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

With no annotations present, the description carries the full burden and does so well: it discloses that resolution is accepted but ignored, that unknown/ambiguous fields return an error with a did_you_mean list, that typos are auto-resolved with _meta.field_resolved_from/field_used, and that an empty range yields empty values rather than an error.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The core action is front-loaded in the first sentence, routing guidance follows immediately, and the second paragraph is a dense but purposeful set of edge-case behaviors. No sentence is filler.

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 no output schema and no annotations, the description still covers error behavior, resolution metadata, and empty-result semantics, which is exactly what an agent needs to call and interpret this tool correctly.

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

Parameters5/5

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

Schema coverage is 0%, so the description must compensate, and it does: it defines the field parameter's naming conventions (category names, _series suffix meaning intraday timeseries vs one value per day), the ISO YYYY-MM-DD inclusive format for date_from/date_to, and the no-op nature of resolution.

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 names a specific verb and resource ('Query external context data (weather, pollen, air quality) for one field over a date range'), and explicitly contrasts itself with query_health and list_available_fields. An agent can distinguish it from every sibling without opening a schema.

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?

It gives explicit routing rules: use query_health for Garmin body data, and call list_available_fields first when the field name is unknown. Both the alternative tool and the condition that selects it are stated, leaving nothing to inference.

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