Skip to main content
Glama
xmpuspus

ph-civic-data-mcp

by xmpuspus

Summarize PhilGEPS procurement

get_procurement_summary
Read-onlyIdempotent

Aggregate procurement statistics from PhilGEPS cached notices by year, agency, or region. Get totals, breakdowns by mode and region, and top agencies for research and analysis.

Instructions

Aggregate procurement statistics over the latest notices cached from PhilGEPS.

This tool aggregates the same latest ~100-notice window search_procurement reads (6h cache). rules_evaluated names which breakdowns ran, by_mode and by_region. rules_not_computable explains why total_value_php stays null: PhilGEPS open notices do not publish approved budget amounts. Examples:

get_procurement_summary() get_procurement_summary(agency="DPWH", year=2025)

On failure: data_status "unavailable", upstream_error true, totals zero and by_mode/by_region/top_agencies empty, with the real PhilGEPS error in caveats. A year that is not a plain integer returns validation_error: true and data_status "invalid_request" before any fetch, naming the bad value.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
yearNoFilter publish date to this year. Drops an undated record and notes the dropped count in caveats.
agencyNoPartial agency match filter.
regionNoPH region filter.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv0.8.0
    • changedInput schema / properties / year / description
      Previous value: -"Filter publish date to this year."New value: +"Filter publish date to this year. Drops an undated record\nand notes the dropped count in caveats."
  2. Addedv0.4.0
  3. Removedv1.0.4
  4. Addedv1.0.2

TDQS

A4.2/5.0
Behavior4/5

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

Annotations already declare readOnlyHint, idempotentHint, and destructiveHint=false. The description adds behavioral context beyond annotations by explaining the 6-hour cache window, error response structure (data_status, upstream_error, validation_error), and dropped-count notes in caveats. This is useful, though it stops short of detailing internal side effects (which are none anyway).

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness2/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is repetitive: the same text about the ~100-notice window, rules_evaluated, rules_not_computable, and error handling appears nearly verbatim in multiple paragraphs. It is not concise and could be halved without losing information. The structure is okay, but the redundancy significantly harms the score.

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?

Despite lacking an explicit output schema listing, the description comprehensively enumerates key output fields (data_status, upstream_error, totals, by_mode, by_region, top_agencies, caveats, validation_error) and covers all error scenarios and validation rules. It also mentions the cache window and filter behavior, making it self-sufficient for an agent to invoke correctly.

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 already provides 100% description coverage for all three parameters (year, agency, region), including details like dropping undated records. The description repeats these examples but does not add any new semantic meaning beyond what the schema already states, so it does not improve upon the baseline.

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 tool aggregates procurement statistics over the latest PhilGEPS notices and explicitly contrasts with search_procurement by referencing the same ~100-notice window. The verb 'aggregate' and resource 'procurement statistics' are specific, and the sibling differentiation is direct.

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?

It provides explicit guidance on when to use this tool versus search_procurement (same window, different purpose) and includes concrete examples. It also documents validation error behavior and failure conditions, leaving no ambiguity about the intended use case.

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