Skip to main content
Glama

get_air_quality

Read-only

Get current air quality for any city, with US AQI and pollutant levels. Use it to determine if outdoor activities are safe, especially for sensitive groups.

Instructions

Get the current air quality for a city, from real-time monitoring and atmospheric model data. Use for any "what's the air quality in X", "is it safe to go outside in Y", "how polluted is Z" style question, or whenever pollen/smog/wildfire-smoke/pollution conditions are relevant to a plan (running, cycling, sensitive-groups advice, travel).

city is a free-text place name (e.g. "Bangkok", "Berlin", "Springfield, US").

Returns a dict with:

  • location: resolved place name/country/admin1

  • us_aqi: the current US Air Quality Index (0-500+)

  • aqi_category: plain-language category computed from us_aqi -- "Good" (0-50), "Moderate" (51-100), "Unhealthy for Sensitive Groups" (101-150), "Unhealthy" (151-200), "Very Unhealthy" (201-300), or "Hazardous" (301+); "Unknown" if no AQI could be resolved for that location

  • pm2_5, pm10: particulate matter concentrations (ug/m3)

  • ozone, nitrogen_dioxide, sulphur_dioxide, carbon_monoxide: trace gas concentrations (ug/m3)

  • local_time: the timestamp of the reading, in the location's local time

  • attribution

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
cityYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Behavior4/5

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

Annotations already declare readOnlyHint=true, and the description adds behavioral context about the data source ('real-time monitoring and atmospheric model data') and how the AQI category is computed. It also thoroughly explains the return structure, which goes beyond the annotation. However, it does not mention potential limitations like locality resolution failures or rate limiting, which would push it higher.

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 description is well-organized: it opens with the primary purpose, then usage examples, then a clear bulleted list of return fields. Every sentence adds value and there is no wasted repetition. It is concise enough while providing comprehensive details.

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?

The tool has an output schema, so return values could be omitted, but the description still explains them in a human-readable way, which is redundant yet helpful. The single parameter is fully explained, and the use-case context is rich. For a simple tool, this description is complete and self-sufficient.

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?

The input schema provides no description for the 'city' parameter (0% coverage), but the description explicitly defines it: '`city` is a free-text place name (e.g. "Bangkok", "Berlin", "Springfield, US").' This fully compensates for the schema gap, giving the agent all necessary context to format the parameter correctly.

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 opens with a clear verb+resource statement ('Get the current air quality for a city') and provides multiple natural-language use cases. It distinguishes itself from any potential ambiguity by specifying the exact domain (air quality, pollen, smog, etc.), making the tool's purpose immediately obvious.

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?

Explicit guidance is given for when to use: 'Use for any “what's the air quality in X”... or whenever pollen/smog/wildfire-smoke/pollution conditions are relevant to a plan.' This clearly frames the intended scenarios and even lists example activities, effectively telling the agent exactly when to invoke the tool.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/Lulu-The-Narwhal/air-quality-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server