Skip to main content
Glama
xmpuspus

ph-civic-data-mcp

by xmpuspus

PAGASA weather alerts

get_weather_alerts
Read-onlyIdempotent

Fetch active PAGASA weather alerts. Returns an empty list only when no alerts are confirmed; otherwise reports an indeterminate status and directs to the official PAGASA site for real-time updates.

Instructions

Get active PAGASA weather alerts and advisories.

The PAGASA homepage embeds alert names such as "Heavy Rainfall Warning" in its navigation menu and breadcrumbs, as well as in real active-warning sections. This tool reliably detects the "No Active Warnings" state, but it cannot yet isolate a real active warning from that navigation text. To avoid a fabricated advisory, this tool returns a bare empty list only for the confirmed "no active warnings" marker. For real-time advisories, call bagong.pagasa.dost.gov.ph directly. Examples:

get_weather_alerts() no region argument get_weather_alerts(region="NCR") region only changes the cache key

On failure, when the PAGASA homepage is unreachable, this tool returns data_status "unavailable", upstream_error: true, results: [], and the real error in caveats. When the page is reachable but the "no active warnings" marker does not match, this tool returns data_status "indeterminate" instead of guessing, and never caches that response.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
regionNoFor example "NCR", "Region VII", "CALABARZON". None returns all.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv0.8.0
    • changedInput schema / properties / region / description
      Previous value: -"e.g. \"NCR\", \"Region VII\", \"CALABARZON\". None returns all."New value: +"For example \"NCR\", \"Region VII\", \"CALABARZON\". None returns all."
  2. Changed3 schema fields changedv0.5.0
    • addedOutput schema / properties / result / anyOf
      Added value: +[
      +  {
      +    "items": {
      +      "additionalProperties": true,
      +      "type": "object"
      +    },
      +    "type": "array"
      +  },
      +  {
      +    "additionalProperties": true,
      +    "type": "object"
      +  }
      +]
    • removedOutput schema / properties / result / items
      Removed value: -{
      -  "additionalProperties": true,
      -  "type": "object"
      -}
    • removedOutput schema / properties / result / type
      Removed value: -"array"
  3. Addedv0.4.0
  4. Removedv1.0.4
  5. Addedv1.0.2

TDQS

A5/5.0
Behavior5/5

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

Honestly discloses that only the 'No Active Warnings' state is reliable, and that active warnings may be missed due to navigation text. Also explains data_status values, upstream_error, and caching behavior, making side effects and limitations transparent.

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 slightly verbose but every sentence carries valuable caveats or examples. The structure is logical, covering purpose, limitations, and failure behavior without unnecessary fluff.

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?

Given the tool's complexity and caveats, the description covers all necessary context: what it can and cannot do, parameter behavior, failure states, and when to call upstream directly. No missing information that would impair correct usage.

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

Parameters5/5

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

Schema covers the region parameter with examples, and the description adds the crucial insight that region only affects the cache key, not the result set. This goes beyond the schema and prevents misuse.

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?

Clearly states the tool fetches active PAGASA weather alerts and advisories, distinguishing it from weather forecasts or typhoon tracks. The examples further clarify its narrow scope.

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?

Provides explicit usage caveats: region only changes the cache key, not filtering; direct access for real-time advisories is recommended; failure modes are described. This tells the agent when to use and not use the tool.

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