Skip to main content
Glama
prsantos-com

AirNow MCP Server

by prsantos-com

get-contour-maps-by-bounding-box-combined-ozone-pm25

Generate combined Ozone and PM2.5 contour maps in KML format for a specified geographic bounding box and timeframe using real-time or historical air quality data.

Instructions

Get current or historical combined Ozone and PM2.5 contour maps in KML by geographic bounding box.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
bboxYesGeographic bounding box of the area of interest in latitude and longitude. Format: minX,minY,maxX,maxY. Example: -118,34,-71,42
dateYesThe date and hour of the data (in UTC). Time represents the beginning of the measurement period. Format: yyyy-mm-ddTHH. Example: January 1, 2012 at 1PM would be formatted as: 2012-01-01T13 and represents data measured between 1:00 PM-1:59 PM UTC
srsYesThe coordinate system of the bounding box. Format: The well-known text or EPSG code. Default: EPSG:4326. Example: EPSG:4326

Implementation Reference

  • Full tool registration including name, description, schema, and handler function.
    export const registerContourMapsByBoundingBoxCombined = (server: McpServer): void => {
      server.tool(
        "get-contour-maps-by-bounding-box-combined-ozone-pm25",
        "Get current or historical combined Ozone and PM2.5 contour maps in KML by geographic bounding box.",
        {
          date: z
            .string()
            .describe(
              "The date and hour of the data (in UTC). Time represents the beginning of the measurement period. Format: yyyy-mm-ddTHH. Example: January 1, 2012 at 1PM would be formatted as: 2012-01-01T13 and represents data measured between 1:00 PM-1:59 PM UTC"
            ),
          bbox: z
            .string()
            .describe(
              "Geographic bounding box of the area of interest in latitude and longitude. Format: minX,minY,maxX,maxY. Example: -118,34,-71,42"
            ),
          srs: z
            .string()
            .describe(
              "The coordinate system of the bounding box. Format: The well-known text or EPSG code. Default: EPSG:4326. Example: EPSG:4326"
            ),
        },
        async (params) => {
          const result =
            await airnowApi.fetchContourMapsByBoundingBoxCombinedOzonePM25(params);
          if (result === null) {
            return {
              content: [
                {
                  type: "text",
                  text: "Failed to fetch contour maps data from AirNow API.",
                },
              ],
              isError: true,
            };
          }
          return {
            content: [
              {
                type: "text",
                text: result,
              },
            ],
          };
        }
      );
    };
  • Core handler logic that performs the HTTP request to AirNow API for combined Ozone and PM2.5 contour maps KML data.
    export async function fetchContourMapsByBoundingBoxCombinedOzonePM25(params: Record<string, string>): Promise<string | null> {
      const endpoint = 'aq/kml/combined/';
      const queryParams = new URLSearchParams();
      queryParams.append('date', params.date);
      queryParams.append('bbox', params.bbox);
      queryParams.append('srs', params.srs || 'EPSG:4326');
    
      return airnowGet(endpoint, queryParams);
    }
  • Zod schema defining the input parameters for the tool: date, bbox, and srs.
    {
      date: z
        .string()
        .describe(
          "The date and hour of the data (in UTC). Time represents the beginning of the measurement period. Format: yyyy-mm-ddTHH. Example: January 1, 2012 at 1PM would be formatted as: 2012-01-01T13 and represents data measured between 1:00 PM-1:59 PM UTC"
        ),
      bbox: z
        .string()
        .describe(
          "Geographic bounding box of the area of interest in latitude and longitude. Format: minX,minY,maxX,maxY. Example: -118,34,-71,42"
        ),
      srs: z
        .string()
        .describe(
          "The coordinate system of the bounding box. Format: The well-known text or EPSG code. Default: EPSG:4326. Example: EPSG:4326"
        ),
    },
  • Central registration function that calls the specific tool registration for this tool among others.
    export const registerTools = (server: McpServer): void => {
      registerContourMapsByBoundingBoxCombined(server);
      registerContourMapsByBoundingBoxOzone(server);
      registerContourMapsByBoundingBoxPM25(server);
      registerCurrentObservationsByZipCode(server);
      registerCurrentObservationsByLatLong(server);
      registerForecastByLatLong(server);
      registerForecastByZipCode(server);
      registerHistoricalObservationsByLatLong(server);
      registerHistoricalObservationsByZipCode(server);
      registerObservationsByBoundingBox(server);
    };
  • src/index.ts:29-29 (registration)
    Main server initialization that triggers all tool registrations.
    registerTools(server);
Behavior2/5

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

No annotations are provided, so the description carries full burden. It mentions 'current or historical' data and KML format, but lacks details on permissions, rate limits, data freshness, or error handling, which are critical for a data retrieval tool with no structured safety hints.

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 a single, efficient sentence that front-loads key information (action, resource, format, method) with no wasted words, making it easy to parse and understand quickly.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given no annotations and no output schema, the description adequately covers the tool's purpose and basic usage but lacks behavioral details like response format, pagination, or error cases, making it minimally viable but incomplete for full agent guidance.

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 description coverage is 100%, so the schema fully documents parameters. The description adds context by specifying 'combined Ozone and PM2.5' and 'KML', but does not provide additional semantic details beyond what the schema already covers, meeting the baseline for high coverage.

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 action ('Get'), the resource ('combined Ozone and PM2.5 contour maps'), the format ('KML'), and the method ('by geographic bounding box'), distinguishing it from siblings that handle single pollutants or different data types like observations or forecasts.

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?

It implies usage for current or historical contour maps via bounding box, but does not explicitly state when to use this tool versus alternatives like sibling tools for single pollutants or other data retrieval methods, leaving some ambiguity in sibling differentiation.

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

Related 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/prsantos-com/airnow-mcp-server'

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