{"openapi":"3.0.3","info":{"title":"Gnist Context — OpenAQ (Air Quality)","description":"Real-time and forecast air quality data including AQI, PM2.5, and pollutant levels.\n\n- **MCP endpoint:** `https://context.gnist.ai/mcp/openaq/`\n- **Toolkit page:** `/toolkits/openaq`\n- **Full API spec:** `/api/openapi.json`\n- **Get an API key:** `/signup`","version":"1.0.0","contact":{"name":"GnistAI","url":"https://gnist.ai"}},"servers":[{"url":"https://context.gnist.ai","description":"Production"}],"paths":{"/rest/openaq/get_air_quality":{"post":{"tags":["Environment"],"summary":"get_air_quality","description":"Get current air quality at the nearest monitoring station.\n\nReturns readings for PM2.5, PM10, O3, NO2, and other available pollutants,\nalong with a derived US EPA AQI score and category.\n\nArgs:\n    lat: Latitude of the location (-90 to 90).\n    lon: Longitude of the location (-180 to 180).\n\nReturns:\n    Station details, per-pollutant measurements, AQI, and dominant pollutant.\n    AQI is derived from PM2.5 using the US EPA formula. Returns null if the\n    nearest station does not report PM2.5.","operationId":"openaq_get_air_quality","responses":{"200":{"description":"Successful tool call","content":{"application/json":{"schema":{"type":"object"}}}},"404":{"description":"Server or tool not found"},"500":{"description":"Tool execution error"}},"security":[{"ApiKeyHeader":[]},{"ApiKeyQuery":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"lat":{"description":"Latitude of the location (-90 to 90).","type":"number"},"lon":{"description":"Longitude of the location (-180 to 180).","type":"number"}},"required":["lat","lon"],"type":"object"}}}}}},"/rest/openaq/get_aqi_summary":{"post":{"tags":["Environment"],"summary":"get_aqi_summary","description":"Get city-level AQI summary with dominant pollutant.\n\nFinds the most recently updated monitoring station matching the city name\nand returns its current readings. Useful when you know the city but not\nthe exact coordinates.\n\nArgs:\n    city: City name (e.g. \"Oslo\", \"London\", \"New York\").\n\nReturns:\n    Station name, AQI score, category, and per-pollutant measurements.","operationId":"openaq_get_aqi_summary","responses":{"200":{"description":"Successful tool call","content":{"application/json":{"schema":{"type":"object"}}}},"404":{"description":"Server or tool not found"},"500":{"description":"Tool execution error"}},"security":[{"ApiKeyHeader":[]},{"ApiKeyQuery":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"city":{"description":"City name (e.g. \"Oslo\", \"London\", \"New York\").","type":"string"}},"required":["city"],"type":"object"}}}}}},"/rest/openaq/get_air_quality_history":{"post":{"tags":["Environment"],"summary":"get_air_quality_history","description":"Get PM2.5 readings from the nearest station over the last N hours.\n\nUseful for trend analysis — is air quality improving or worsening?\n\nArgs:\n    lat: Latitude of the location (-90 to 90).\n    lon: Longitude of the location (-180 to 180).\n    hours: Number of hours of history to retrieve (1–72, default 24).\n\nReturns:\n    Station name, parameter, unit, and a time-series of PM2.5 readings.\n    Returns an empty entries list if the nearest station has no PM2.5 sensor.","operationId":"openaq_get_air_quality_history","responses":{"200":{"description":"Successful tool call","content":{"application/json":{"schema":{"type":"object"}}}},"404":{"description":"Server or tool not found"},"500":{"description":"Tool execution error"}},"security":[{"ApiKeyHeader":[]},{"ApiKeyQuery":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"lat":{"description":"Latitude of the location (-90 to 90).","type":"number"},"lon":{"description":"Longitude of the location (-180 to 180).","type":"number"},"hours":{"default":24,"description":"Number of hours of history to retrieve (1–72, default 24).","type":"integer"}},"required":["lat","lon"],"type":"object"}}}}}},"/rest/openaq/report_feedback":{"post":{"tags":["Environment"],"summary":"report_feedback","description":"Report a bug, feature request, or general feedback for this data source.\n\nUse this when something doesn't work as expected, when you'd like\na new feature, or when you have suggestions for improvement.\n\nArgs:\n    feedback: Describe the issue or suggestion.\n    feedback_type: One of 'bug', 'feature_request', or 'general'.","operationId":"openaq_report_feedback","responses":{"200":{"description":"Successful tool call","content":{"application/json":{"schema":{"type":"object"}}}},"404":{"description":"Server or tool not found"},"500":{"description":"Tool execution error"}},"security":[{"ApiKeyHeader":[]},{"ApiKeyQuery":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"feedback":{"type":"string"},"feedback_type":{"default":"general","type":"string"}},"required":["feedback"],"type":"object"}}}}}}},"tags":[{"name":"Environment","description":"Data sources: Environment"}],"components":{"securitySchemes":{"ApiKeyHeader":{"type":"apiKey","in":"header","name":"gnist-api-key","description":"API key passed via request header."},"ApiKeyQuery":{"type":"apiKey","in":"query","name":"gnist_api_key","description":"API key passed via query parameter."}}}}