Skip to main content
Glama

national-parks-mcp-server: get alerts

nps_get_alerts
Read-only

Current alerts for a park or a whole state — closures, hazards, caution notices, and information — with category and recency surfaced first so "is anything closed at Glacier right now?" is answered at a glance. Get park codes from nps_find_parks, or pass a stateCode for a statewide "what's closed" sweep. Returns most-recent-first. An empty result with totalCount 0 means no active alerts match the request (with category or query set, alerts outside that filter may still be active); an empty page with a non-zero totalCount means start ran past the end of the matches. Closures and road conditions change daily.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
limitNoMaximum alerts to return (1–50), most-recent first.
queryNoFree-text search within alert titles/descriptions (e.g. "road", "wildfire", "trail").
startNoZero-based offset for pagination within the matched set. Use with limit to page through results — when totalCount exceeds what was returned, re-request with start advanced by limit.
categoryNoFilter to one alert category. "Danger" and "Park Closure" are trip-affecting. Combined with parkCode/stateCode/query and applied before start/limit, so totalCount counts every matching alert, not one page. Omit to see all categories.
parkCodeNoPark code, or comma-separated list (e.g. "glac", "yose,zion") — 4-letter lowercase codes. Get codes from nps_find_parks. Provide parkCode or stateCode; with neither, returns recent alerts service-wide.
stateCodeNoTwo-letter state code, or comma-separated list (e.g. "MT", "WY,MT,ID"). Returns alerts for all NPS sites in those states — use for a statewide sweep rather than one park.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
capNoLimit applied (populated when results were truncated).
errorNoPresent when the call failed. Absent on success.
shownNoAlerts returned in this response (populated when capped by limit).
alertsNoCurrent alerts, most-recent first. Empty with totalCount 0 means no active alerts match the request; empty with a non-zero totalCount means start ran past the end of the matches.
noticeNoGuidance on the result set: whether an empty page means no active alerts match (totalCount 0) or start ran past the end of the matches, the start value for the next page when more alerts matched, and a best-effort disclosure when the category filter could not cover every alert.
truncatedNoTrue when more alerts matched than this response returned; absent on a complete result.
totalCountNoTotal alerts matching the filter before the limit was applied.
appliedFiltersNoEcho of parkCode/stateCode/category/query as applied.
categoryBreakdownNoCount of returned alerts per category, most severe first (e.g. "Park Closure: 3, Caution: 1, Information: 2").

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed7 schema fields changed
    • changedInput schema / properties / category / description
      Previous value: -"Filter to one alert category. \"Danger\" and \"Park Closure\" are the high-priority ones for trip safety. Applied locally (the API has no category param) across every alert matching parkCode/stateCode/query, then paginated with start/limit — so totalCount is the true count of matching alerts, not a per-page tally. Omit to see all categories (the default — closures and hazards should not be missed)."New value: +"Filter to one alert category. \"Danger\" and \"Park Closure\" are trip-affecting. Combined with parkCode/stateCode/query and applied before start/limit, so totalCount counts every matching alert, not one page. Omit to see all categories."
    • changedOutput schema / properties / alerts / description
      Previous value: -"Current alerts, sorted most-recent first. An empty array with totalCount 0 means no active alerts — good news, not an error; with a non-zero totalCount it means start paged past the end of the matches. The notice says which."New value: +"Current alerts, most-recent first. Empty with totalCount 0 means no active alerts match the request; empty with a non-zero totalCount means start ran past the end of the matches."
    • changedOutput schema / properties / alerts / items / properties / category / description
      Previous value: -"Alert category: \"Danger\", \"Park Closure\", \"Caution\", or \"Information\". Treat Danger and Park Closure as trip-affecting."New value: +"Alert category: \"Danger\", \"Park Closure\", \"Caution\", or \"Information\". Danger and Park Closure are trip-affecting."
    • changedOutput schema / properties / alerts / items / properties / lastIndexedDate / description
      Previous value: -"When NPS last updated/indexed this alert (YYYY-MM-DD), or null. The recency signal — a stale date may mean the condition has changed; verify against the park page."New value: +"When NPS last updated/indexed this alert (YYYY-MM-DD), or null. The recency signal — a stale date may mean the condition has changed."
    • changedOutput schema / properties / categoryBreakdown / description
      Previous value: -"Count of returned alerts per category (e.g. \"Park Closure: 3, Caution: 1, Information: 2\") — gauge severity without scanning every alert."New value: +"Count of returned alerts per category, most severe first (e.g. \"Park Closure: 3, Caution: 1, Information: 2\")."
    • changedOutput schema / properties / notice / description
      Previous value: -"Message when the page is empty — states which case it is: good news (totalCount 0, the park reports nothing closed/hazardous right now) or a paging artifact (start ran past the end of a non-empty matched set)."New value: +"Guidance on the result set: whether an empty page means no active alerts match (totalCount 0) or start ran past the end of the matches, the start value for the next page when more alerts matched, and a best-effort disclosure when the category filter could not cover every alert."
    • addedOutput schema / properties / truncated
      Added value: +{
      +  "description": "True when more alerts matched than this response returned; absent on a complete result.",
      +  "type": "boolean"
      +}
  2. Changed4 schema fields changed
    • removedOutput schema / properties / alerts / items / properties / lastIndexedDate / anyOf
      Removed value: -[
      -  {
      -    "type": "string"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • addedOutput schema / properties / alerts / items / properties / lastIndexedDate / type
      Added value: +[
      +  "string",
      +  "null"
      +]
    • removedOutput schema / properties / alerts / items / properties / url / anyOf
      Removed value: -[
      -  {
      -    "type": "string"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • addedOutput schema / properties / alerts / items / properties / url / type
      Added value: +[
      +  "string",
      +  "null"
      +]
  3. Changed6 schema fields changed
    • changedInput schema / $schema
      Previous value: -"http://json-schema.org/draft-07/schema#"New value: +"https://json-schema.org/draft/2020-12/schema"
    • addedInput schema / additionalProperties
      Added value: +false
    • changedOutput schema / $schema
      Previous value: -"http://json-schema.org/draft-07/schema#"New value: +"https://json-schema.org/draft/2020-12/schema"
    • addedOutput schema / anyOf
      Added value: +[
      +  {
      +    "not": {
      +      "required": [
      +        "error"
      +      ]
      +    },
      +    "required": [
      +      "alerts",
      +      "totalCount",
      +      "categoryBreakdown",
      +      "appliedFilters"
      +    ]
      +  },
      +  {
      +    "required": [
      +      "error"
      +    ]
      +  }
      +]
    • addedOutput schema / properties / error
      Added value: +{
      +  "additionalProperties": {},
      +  "description": "Present when the call failed. Absent on success.",
      +  "properties": {
      +    "code": {
      +      "description": "JSON-RPC error code for this failure.",
      +      "maximum": 9007199254740991,
      +      "minimum": -9007199254740991,
      +      "type": "integer"
      +    },
      +    "data": {
      +      "additionalProperties": {},
      +      "properties": {
      +        "reason": {
      +          "description": "Machine-readable failure mode. Declared by this tool: `invalid_park_code`: A parkCode token isn't 4 lowercase letters. `invalid_state_code`: A stateCode token isn't two letters. Other values are possible when a failure originates below the handler.",
      +          "examples": [
      +            "invalid_park_code",
      +            "invalid_state_code"
      +          ],
      +          "type": "string"
      +        },
      +        "recovery": {
      +          "additionalProperties": {},
      +          "description": "Actionable next step for the caller.",
      +          "properties": {
      +            "hint": {
      +              "type": "string"
      +            }
      +          },
      +          "required": [
      +            "hint"
      +          ],
      +          "type": "object"
      +        },
      +        "retryable": {
      +          "description": "Whether retrying may succeed.",
      +          "type": "boolean"
      +        }
      +      },
      +      "type": "object"
      +    },
      +    "message": {
      +      "description": "Human-readable description of what went wrong.",
      +      "type": "string"
      +    }
      +  },
      +  "required": [
      +    "code",
      +    "message"
      +  ],
      +  "type": "object"
      +}
    • removedOutput schema / required
      Removed value: -[
      -  "alerts",
      -  "totalCount",
      -  "categoryBreakdown",
      -  "appliedFilters"
      -]
  4. Changed3 schema fields changed
    • changedInput schema / properties / parkCode / description
      Previous value: -"Park code, or comma-separated list (e.g. \"glac\", \"yose,zion\"). Get codes from nps_find_parks. Provide parkCode or stateCode; with neither, returns recent alerts service-wide."New value: +"Park code, or comma-separated list (e.g. \"glac\", \"yose,zion\") — 4-letter lowercase codes. Get codes from nps_find_parks. Provide parkCode or stateCode; with neither, returns recent alerts service-wide."
    • removedInput schema / properties / parkCode / pattern
      Removed value: -"^[a-z]{4}(,[a-z]{4})*$"
    • removedInput schema / properties / stateCode / pattern
      Removed value: -"^[A-Za-z]{2}(,[A-Za-z]{2})*$"
  5. Changed4 schema fields changed
    • changedInput schema / properties / category / description
      Previous value: -"Filter to one alert category. \"Danger\" and \"Park Closure\" are the high-priority ones for trip safety. Omit to see all categories (the default — closures and hazards should not be missed)."New value: +"Filter to one alert category. \"Danger\" and \"Park Closure\" are the high-priority ones for trip safety. Applied locally (the API has no category param) across every alert matching parkCode/stateCode/query, then paginated with start/limit — so totalCount is the true count of matching alerts, not a per-page tally. Omit to see all categories (the default — closures and hazards should not be missed)."
    • addedInput schema / properties / start
      Added value: +{
      +  "default": 0,
      +  "description": "Zero-based offset for pagination within the matched set. Use with limit to page through results — when totalCount exceeds what was returned, re-request with start advanced by limit.",
      +  "maximum": 9007199254740991,
      +  "minimum": 0,
      +  "type": "integer"
      +}
    • changedOutput schema / properties / alerts / description
      Previous value: -"Current alerts, sorted most-recent first. An empty array means no active alerts — good news, not an error."New value: +"Current alerts, sorted most-recent first. An empty array with totalCount 0 means no active alerts — good news, not an error; with a non-zero totalCount it means start paged past the end of the matches. The notice says which."
    • changedOutput schema / properties / notice / description
      Previous value: -"Message when there are no active alerts — explicitly states this is good news (the park reports nothing closed/hazardous right now)."New value: +"Message when the page is empty — states which case it is: good news (totalCount 0, the park reports nothing closed/hazardous right now) or a paging artifact (start ran past the end of a non-empty matched set)."
  6. First observed

TDQS

A4.9/5.0
Behavior5/5

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

Even though readOnlyHint and openWorldHint are present, the description adds substantial behavioral detail: returns most-recent-first, explains the distinction between an empty result (totalCount 0) and an exhausted page (non-zero totalCount), warns that filters may hide still-active alerts, and notes that closures change daily. This goes well beyond what the annotations provide.

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 dense but well-organized: main purpose and example first, then code-source guidance, then ordering, then pagination and filter edge cases, then a freshness caveat. Every sentence earns its place and the structure lets an agent quickly extract the key behavior without rereading.

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

Completeness5/5

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

With a rich output schema, complete parameter descriptions in the schema, and a description that covers recency, pagination semantics, filter behavior, and cross-tool dependencies, nothing an agent needs to call this tool correctly is missing. The open-world note about filtered results is especially valuable.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the baseline is 3, but the description adds meaningful context: it explains the open-world caveat for category/query filters, clarifies the pagination edge case for start, and frames stateCode as a statewide sweep. It doesn't redefine every parameter, but the schema already covers those details thoroughly.

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 names a specific resource (alerts) and a clear scope (park or state), enumerates alert types (closures, hazards, cautions, information), and frames the use case with an example question. It is immediately distinguishable from siblings like nps_find_parks or nps_get_park, and it even cross-references nps_find_parks for obtaining park codes.

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

Usage Guidelines5/5

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

The description gives explicit when-to-use guidance: check alerts for a park or a statewide sweep for closures, and tells the agent where to get park codes (nps_find_parks). It also distinguishes parkCode usage from stateCode usage and notes the service-wide fallback when neither is provided.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.