get_air_quality
Pack: science · Endpoint: https://gateway.pipeworx.io/science/mcp
Check air quality at a location (e.g., ‘New York’, ‘London’). Returns AQI score, PM2.5, PM10, ozone, and NO2 levels.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
latitude | number | yes | Latitude |
longitude | number | yes | Longitude |
Example call
Arguments
{
"latitude": 40.7128,
"longitude": -74.006
}
curl
curl -X POST https://gateway.pipeworx.io/science/mcp \
-H 'Content-Type: application/json' \
-d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"get_air_quality","arguments":{"latitude":40.7128,"longitude":-74.006}}}'
TypeScript (@pipeworx/sdk)
import { Pipeworx } from '@pipeworx/sdk';
const pipeworx = new Pipeworx();
const result = await pipeworx.call('get_air_quality', {
"latitude": 40.7128,
"longitude": -74.006
});
More examples
{
"latitude": 51.5074,
"longitude": -0.1278
}
Response shape
Always returns: stations
| Field | Type | Description |
|---|---|---|
stations | array | Air quality monitoring stations near coordinates |
Full JSON Schema
{
"type": "object",
"properties": {
"stations": {
"type": "array",
"description": "Air quality monitoring stations near coordinates",
"items": {
"type": "object",
"properties": {
"location": {
"type": "string",
"description": "Station location name"
},
"city": {
"type": "string",
"description": "City name"
},
"country": {
"type": "string",
"description": "Country name"
},
"measurements": {
"type": "array",
"description": "Air quality measurements",
"items": {
"type": "object",
"properties": {
"parameter": {
"type": "string",
"description": "Measured parameter (e.g., PM2.5, PM10)"
},
"value": {
"type": "number",
"description": "Measurement value"
},
"unit": {
"type": "string",
"description": "Unit of measurement"
},
"last_updated": {
"type": "string",
"description": "ISO 8601 timestamp of last update"
}
},
"required": [
"parameter",
"value",
"unit",
"last_updated"
]
}
}
},
"required": [
"location",
"city",
"country",
"measurements"
]
}
}
},
"required": [
"stations"
]
}
Connect
Add this to your MCP client config, or use one-click install buttons:
{
"mcpServers": {
"science": {
"url": "https://gateway.pipeworx.io/science/mcp"
}
}
}
See Getting Started for client-specific install steps.