Skip to main content
Glama

sns_consultation_wait_stats

Retrieve official monthly SNS hospital outpatient consultation volumes and the percentage of first specialist consultations held within the guaranteed maximum time by hospital/ULS 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.1

TDQS

A4.5/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 freshness ('official monthly statistics, latest month usually 2-3 months back, provisional'), a hard coverage limit (no specialty breakdown), and the precedence rule that region is ignored when institution is supplied. It does not cover failure modes (unknown institution names, out-of-range periods) or behavior when data is missing.

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?

Well front-loaded: purpose, then triggering questions, then caveats, then args — an agent can stop reading after sentence one and still act. Slight redundancy in restating 'for the month and year-to-date' and a longer-than-needed list of returned fields given an output schema exists.

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?

For a four-optional-parameter statistics tool with no annotations, everything needed to call it correctly is present: scope, data lag/provisionality, coverage gaps, period semantics, and the institution-vs-region precedence rule. An output schema exists, yet the description still summarizes returned fields as a bonus.

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%, yet the Args block fully compensates: institution is mapped to its ULS, region enumerates all five values, period specifies the "YYYY-MM" format and default, and months gives default 6 with a max of 24. The critical precedence rule ('region ignored if institution is given') is stated explicitly and is not derivable from the schema.

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 states a specific metric set (monthly hospital outpatient consultations plus % of first specialist consultations within the guaranteed maximum time) and a specific scope (TMRG/CTH/SIGA referrals). This is clearly distinguishable from siblings like sns_surgery_wait_stats and sns_emergency_stats, which cover different event types.

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?

Three concrete user-question templates ('how long is the wait for a first hospital appointment at X?', 'is hospital Y on time…', 'how many consultations did the Centro region do?') make the triggering context unambiguous. It also sets a boundary ('no breakdown by specialty in the open data'), but it never names or routes against a sibling tool.

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