Skip to main content
Glama

consultation_wait_stats

Query monthly hospital outpatient consultation counts and the percentage of first specialist consultations held within Portugal's guaranteed maximum waiting time by institution or region.

Instructions

Hospital outpatient consultations per month and the % of FIRST specialist consultations (referred by a family doctor via CTH/SIGA) held within the guaranteed maximum time (TMRG).

Use for "how long is the wait for a first hospital appointment at X?", "is hospital Y on time with first consultations?", "how many consultations did the Centro region do?". Official monthly statistics (latest month usually 2-3 months back, provisional); there is no breakdown by specialty in the open data.

Per period (latest first): consultations_in_month / _year_to_date (total, first, subsequent) and first_consultations_within_max_time_pct for the month and year-to-date.

Args: institution: Hospital or ULS name; mapped to its ULS. region: Norte | Centro | LVT (Lisboa) | Alentejo | Algarve. Ignored if institution is given. period: Latest month to include, "YYYY-MM" (default: newest available). months: How many months back (default 6, max 24).

Input Schema

NameRequiredDescriptionDefault
monthsNo
periodNo
regionNo
institutionNo

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.7/5.0
Behavior4/5

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

With no annotations, the description carries the full burden and does well: it discloses data provenance and staleness ('official monthly statistics, latest month usually 2-3 months back, provisional'), aggregation limits, and the institution-to-ULS remapping side effect of the institution argument. It does not explicitly state read-only/safe semantics or pagination/size limits, which is the remaining gap for a zero-annotation tool.

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

Conciseness4/5

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

Purpose and metric come first, then usage triggers, caveats, and an Args block — a sensible front-loaded order with no filler sentences. It is somewhat dense with unexplained domain acronyms (CTH/SIGA, TMRG) and the terse return-field notation in the middle paragraph is compact to the point of being cryptic.

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?

An output schema exists, yet the description still sketches the returned shape (consultations_in_month / _year_to_date broken out by total, first, subsequent, plus the within-max-time percentage) and adds the data-freshness caveat an agent needs to interpret it. Nothing needed to call this correctly is missing.

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 description coverage is 0%, so the description must compensate, and it fully does: institution is described with its ULS mapping behavior, region with its five accepted values and the explicit 'ignored if institution is given' rule, period with its YYYY-MM format and default, and months with its default and max of 24.

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 opening sentence names the specific resource (hospital outpatient consultations per month) and the key derived metric (% of first consultations within the guaranteed maximum time). It is clearly distinct from the sibling wait/emergency tools by resource and metric, so an agent can disambiguate without opening the schema.

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 supplies concrete trigger questions ('how long is the wait for a first hospital appointment at X?') and states a real limitation (no breakdown by specialty in the open data) plus the institution-vs-region precedence rule. Defaults and the -2/-3 month latency expectation are given, leaving little to infer.

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