Skip to main content
Glama

OpenWeather for agents

Fetch data

fetch_data
Read-only

Fetches one data response: GET data.openweathermap.org/{product}/{route} with the query parameters you pass, using the data key from your client configuration's Authorization header or the data_key argument — never the secret, which fetches nothing. A successful call is billed the product's price per call; a refused call costs nothing. The result carries the payload with the platform's meta block (licence and attribution) and the rate-limit headers; the balance is read with account_status, never from a data response. Every refusal is the platform's error envelope unchanged — a code from https://agents.openweathermap.org/errors.json; 402 payment_required means the key is known but cannot pay for this product now, and 401 invalid_key means it is authorized for no product at all, most often because every credit is spent. Both carry an action_url: a human tops up there (get_topup_link returns the page) and the same key serves again within the engine's build interval plus the region's poll interval.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
routeYesa route from get_product, without the product prefix — e.g. current or timeline/1h
paramsNoquery parameters, sent as given; the parameters a route requires are in get_product
productYesa product slug from list_products
data_keyNoonly when the client cannot send an Authorization header — the data_key.key sign_up returned in this session; when both are present the argument wins

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
bodyNo
faultNo
usageNo
recordNo
statusNo
accountNo
headersNo
upstreamNo
body_textNo
configureNo
transportNo
key_sourceNo
request_idYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.7/5.0
Behavior5/5

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

The description goes well beyond annotations by disclosing billing behavior (successful calls are billed, refused calls cost nothing), error handling (returns platform error envelope with codes and action_url), and rate-limit headers. It clearly states that the secret fetches nothing and that balance is not read from data responses, which is critical for correct usage.

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

Conciseness3/5

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

The description is a single dense paragraph that covers many important details, but it is long and somewhat unstructured. While every sentence adds value, the lack of bullet points or clear separation makes it harder to parse quickly. It is not concise, but it is content-rich.

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?

Given the tool's complexity (multiple parameters, billing, error handling, and relation to siblings), the description covers all necessary aspects: how to call, what happens on success/failure, how to handle errors, and what not to use it for. The presence of an output schema reduces the need to explain return values, but the description even hints at the payload structure. It is fully complete for an agent to use correctly.

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?

The schema has 100% description coverage for all parameters, so the baseline is 3. The description adds extra context not in the schema, such as the data_key being an alternative to the Authorization header and the precedence when both are present. It also clarifies that params are passed as given, aligning with the schema. This additional guidance justifies one point above baseline.

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 clearly states the tool fetches a data response from a specific endpoint (data.openweathermap.org) using a product and route, distinguishing it from siblings like get_product and list_products. It explains the exact HTTP method and path structure, making it unambiguous.

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 explicitly explains when to use this tool (to fetch data) and when not to (e.g., to check balance, use account_status; to get top-up link, use get_topup_link). It also mentions using the data key vs secret, and that certain errors indicate specific conditions, guiding the agent on next steps.

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.

Resources