Skip to main content
Glama

surgery_wait_stats

Retrieve monthly official surgical waiting-list figures by Portuguese hospital or region: patients waiting, % within maximum response time, mean admission-to-surgery days, and surgeries performed.

Instructions

Surgery access indicators per month: surgical waiting list, % within the guaranteed maximum time, mean days from admission to surgery, and surgeries performed.

Use for "how long is the wait for surgery at X?", "how many people are on the surgery list in the Norte region?", "how many operations did hospital Y do?". Official monthly statistics (latest month usually 2-3 months back, provisional). The open data has NO breakdown by specialty or procedure — say so if asked for one.

Per period (latest first):

  • waiting_list: patients on the surgical waiting list (LIC) at month end, how many are still within the legal maximum guaranteed response time (TMRG, 180 days for normal priority since 2018) and the % within it.

  • mean_days_before_surgery_in_month / _year_to_date: average days between hospital admission and the operation for scheduled inpatient surgery (this is NOT the time on the waiting list).

  • surgeries_in_month / surgeries_year_to_date: scheduled (= inpatient + day surgery) and urgent.

Args: institution: Hospital or ULS name ("Santa Maria", "Coimbra", "IPO Porto"); 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.6/5.0
Behavior4/5

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

With no annotations, the description carries the behavioral burden and does well: it discloses that the data are official monthly statistics, usually 2-3 months behind, provisional, and lacking specialty/procedure breakdown. It also defines key metrics such as TMRG and clarifies that mean days before surgery is not waiting-list time. It does not explicitly state read-only/access constraints, but the statistical nature makes that largely inferable.

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 long but well-structured and front-loaded: purpose and use cases first, then metric definitions, then argument semantics. Given the complexity of the indicators and the lack of schema descriptions, every section earns its place.

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, so return values need not be explained in the description. The description covers data vintage, provisional status, metric definitions, limitations, and all four parameters, leaving an agent with enough context to call the tool correctly.

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 does: institution examples and ULS mapping, region enum values with the rule that region is ignored when institution is given, period format/default, and months default/max are all documented. This adds substantial meaning beyond the bare schema types and defaults.

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 and metric set: monthly surgery access indicators including waiting list, TMRG compliance, mean days to surgery, and surgeries performed. It is clearly distinguishable from siblings such as emergency_stats and consultation_wait_stats by its surgery-specific scope.

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?

It gives explicit example questions ("how long is the wait for surgery at X?", "how many operations did hospital Y do?") and a clear limitation about no specialty/procedure breakdown. It would be stronger if it explicitly named alternatives such as consultation_wait_stats for consultation waits or find_institutions for resolving institution names.

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