Skip to main content
Glama
prsantos-com

AirNow MCP Server

by prsantos-com

get-contour-maps-by-geographic-bounding-box-ozone

Access current or historical ozone contour maps by defining a geographic bounding box. Enter date, area coordinates, and coordinate system to retrieve KML-formatted data for air quality analysis.

Instructions

Get current or historical Ozone 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

  • The MCP tool handler function that invokes the AirNow API helper to fetch ozone contour maps and returns the KML content or an error message.
    async (params) => {
      const result =
        await airnowApi.fetchContourMapsByGeographicBoundingBoxOzone(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,
          },
        ],
      };
    }
  • 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"
        ),
    },
  • The registration function that registers the MCP tool with the server, including name, description, schema, and handler.
    export const registerContourMapsByBoundingBoxOzone = (server: McpServer): void => {
      server.tool(
        "get-contour-maps-by-geographic-bounding-box-ozone",
        "Get current or historical Ozone 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.fetchContourMapsByGeographicBoundingBoxOzone(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,
              },
            ],
          };
        }
      );
    };
  • Helper function that makes the HTTP request to the AirNow API ozone contour maps endpoint using the generic airnowGet function.
    export async function fetchContourMapsByGeographicBoundingBoxOzone(params: Record<string, string>): Promise<string | null> {
      const endpoint = 'aq/kml/ozone/';
      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);
    }
Behavior2/5

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

With no annotations provided, the description carries full burden but offers minimal behavioral context. It states the output format (KML) and temporal scope (current/historical), but doesn't disclose authentication needs, rate limits, data freshness, error conditions, or what 'contour maps' specifically contain. For a data retrieval tool with zero annotation coverage, this leaves significant gaps.

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, well-structured sentence with zero wasted words. It front-loads the core purpose and efficiently includes key details (Ozone, KML, bounding box). Every element earns its place.

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 3 parameters with full schema coverage but no annotations or output schema, the description is minimally adequate. It covers the basic purpose and output format, but for a tool that retrieves environmental data with temporal and spatial parameters, more context about data sources, update frequency, or typical use cases would be helpful.

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 all three parameters. The description adds no parameter-specific information beyond what's in the schema (e.g., it doesn't clarify 'bbox' format or 'date' interpretation). Baseline score of 3 is appropriate when the schema does all the heavy lifting.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the action ('Get'), resource ('Ozone contour maps'), format ('in KML'), and scope ('by geographic bounding box'). It distinguishes from some siblings by specifying 'Ozone' (vs. PM2.5 or combined) and 'geographic bounding box' (vs. other location methods), but doesn't explicitly differentiate from all similar tools like 'get-contour-maps-by-bounding-box-combined-ozone-pm25'.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives. It mentions 'current or historical' but doesn't explain when to choose this over other observation or forecast tools in the sibling list, nor does it specify any prerequisites or exclusions for usage.

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