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 response headers x-cost-charged and x-cost-remaining. Every refusal is the platform's error envelope unchanged — a code from https://agents.openweathermap.org/errors.json; 402 payment_required means the balance is spent and a human tops up at its action_url (get_topup_link returns the page).

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. Dates show when Glama detected each change.

  1. First observed

TDQS

A4.3/5.0
Behavior5/5

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

Beyond the annotations (readOnlyHint, openWorldHint), the description discloses substantial behavior: the auth mechanism and the warning that the secret 'fetches nothing', per-call billing with refused calls free, the exact cost-related response headers (x-cost-charged, x-cost-remaining), and a detailed error-envelope contract with a link to error codes plus 402-specific handling. No contradiction with annotations exists.

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?

All four sentences earn their place: purpose/auth, billing, success response shape, and error handling. The purpose is front-loaded and there is no filler, though the density of the single-block text makes it slightly harder to parse than if broken into bulleted behavioral notes.

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?

Given the tool's complexity — auth nuances, billing, error envelopes — the description covers nearly everything an agent needs: how to authenticate, what not to pass, cost behavior, success payload contents (with an output schema present), and the 402 recovery path. Minor gaps remain, such as rate-limit behavior and how the data key enters client configuration.

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?

Schema coverage is 100%, so the schema already documents all four parameters well, including the precedence rule for data_key and the route/product sources. The description adds only marginal param value: the clarification that the Authorization header uses the data key and the caution that the secret is never a valid value. This keeps it at the baseline of 3.

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 ('Fetches') plus an exact resource ('GET data.openweathermap.org/{product}/{route}'), making the operation unmistakable. It also distinguishes itself from siblings: list_products and get_product supply the inputs, account_status covers account state, and get_topup_link handles payment — leaving fetch_data clearly as the only tool that retrieves actual data.

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 embeds workflow context by pointing to get_product for routes and parameters and to get_topup_link for the 402 top-up path, so an agent learns how this tool fits into the larger flow. It lacks explicit when-not-to-use exclusions (e.g., 'use account_status instead for balance queries'), but the context is clear enough to route correctly.

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.

TDQS

A4.5/5.0
Disambiguation5/5

Each tool has a single unambiguous role: catalogue browsing, data fetching, account creation, account status, and top-up. Even get_product and list_products are cleanly separated by singular/plural and detail level.

Naming Consistency4/5

Most tools follow a verb_noun pattern (fetch_data, get_product, get_topup_link, list_products), and all names are lowercase snake_case. account_status and sign_up break the verb_noun pattern, but they are still readable and predictable.

Tool Count5/5

Six tools is a well-scoped set for an API platform server: discovery, data access, account monitoring, and top-up each have dedicated coverage. No tool feels redundant, and the count is appropriate for the server's purpose.

Completeness4/5

The set covers the full usage loop: sign up, discover products, fetch data, check balance/usage, and top up. Minor gaps exist — sign_up references a login_to_link action that no tool provides, and there is no key rotation or management — but they do not block the primary agent workflow.

Resources