Skip to main content
Glama

get_alerts

Retrieve active government weather alerts and warnings for any location worldwide. Provides severity, urgency, affected areas, and detailed descriptions to help users stay informed about hazardous weather conditions.

Instructions

Get active government weather alerts and warnings for a location. Covers USA, UK, Europe, and rest of world. Returns headline, severity, urgency, affected areas, and full description.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
qYesLocation query — city name, lat/lon, zip, postcode, IATA, or IP.

Implementation Reference

  • The handler for the 'get_alerts' tool, which calls the weatherRequest utility with the '/alerts.json' endpoint.
    case "get_alerts": {
      const { q } = args as { q: string };
      result = await weatherRequest("/alerts.json", { q });
      break;
    }
  • The input schema definition for the 'get_alerts' tool.
    {
      name: "get_alerts",
      description:
        "Get active government weather alerts and warnings for a location. Covers USA, UK, Europe, and rest of world. Returns headline, severity, urgency, affected areas, and full description.",
      inputSchema: {
        type: "object",
        properties: {
          q: {
            type: "string",
            description: "Location query — city name, lat/lon, zip, postcode, IATA, or IP.",
          },
        },
        required: ["q"],
      },
    },
Behavior3/5

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

With no annotations provided, the description carries the full burden. It discloses the tool's behavior by specifying the geographic coverage and return fields, but lacks details on rate limits, authentication needs, error handling, or whether it's read-only (implied by 'Get' but not explicit). It adds some context but leaves gaps in behavioral traits.

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 front-loaded with the core purpose in the first sentence, followed by additional details in a second sentence. Every sentence earns its place by adding geographic scope and output specifics without redundancy, making it appropriately sized and efficient.

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

Completeness4/5

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

Given the tool's moderate complexity (1 parameter, no output schema, no annotations), the description is fairly complete. It covers purpose, scope, and return fields, but lacks output format details (e.g., structure of returned data) and error scenarios. Since there's no output schema, more detail on returns would be beneficial, but it's adequate for basic use.

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?

The input schema has 100% description coverage, with the parameter 'q' documented as 'Location query — city name, lat/lon, zip, postcode, IATA, or IP.' The description does not add meaning beyond this, as it only mentions 'for a location' without elaborating on parameter usage. Baseline 3 is appropriate since the schema does the heavy lifting.

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 specific verb ('Get') and resource ('active government weather alerts and warnings for a location'), with explicit geographic scope ('USA, UK, Europe, and rest of world') and output details ('headline, severity, urgency, affected areas, and full description'). It distinguishes from siblings like get_current_weather or get_forecast by focusing on alerts/warnings rather than general weather data.

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?

The description provides clear context for when to use this tool ('for a location' and geographic coverage), implying it's for alert retrieval rather than other weather data. However, it does not explicitly state when not to use it or name alternatives among siblings (e.g., no comparison to get_current_weather for non-alert weather info), so it falls short of a perfect score.

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/weatherapicom/weatherapi-mcp'

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