sns-portugal-mcp
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| SNS_ODS_BASE_URL | No | Optional override for the SNS Transparency portal Explore API base URL. | |
| SNS_INSTITUTIONS_URL | No | Optional override for the institutions list URL (defaults to tempos.min-saude.pt/institutions.json). |
Instructions
Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.
This server publishes no instructions, or was last inspected before Glama recorded them.
Capabilities
Features and capabilities supported by this server
Protocol revision2025-11-25
| Capability | Details |
|---|---|
| tools | {
"listChanged": false
} |
| prompts | {
"listChanged": false
} |
| resources | {
"subscribe": false,
"listChanged": false
} |
| experimental | {} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| find_institutionsA | Find SNS hospitals / local health units (ULS) by name, or the nearest ones to a coordinate. Use this first when the user names a hospital or a place ("hospitals near Lisbon",
"is there an emergency department near 38.72,-9.14?"), then pass Each result: name, its parent ULS, coordinates, distance_km (when lat/lon given), whether
it reports emergency / consultation / surgery data on tempos.min-saude.pt, and
Args:
query: Part of the name, accent-insensitive, e.g. "Santa Maria", "Faro", "ULS Algarve".
lat, lon: Sort by distance from this point (WGS84), e.g. Lisbon 38.7223, -9.1393.
Without |
| emergency_statsA | Emergency-department (urgência) visits per month: by type and by Manchester triage colour. Use for "how busy is the ER at X?", "how many emergency visits in the Algarve last month?", "what share of ER visits are green/blue (non-urgent)?". OFFICIAL MONTHLY STATISTICS ONLY — not the live queue (the latest month is usually 2-3 months back and provisional). For live waiting times send the user to https://tempos.min-saude.pt. Not medical advice: in an emergency call 112; SNS 24 (808 24 24 24) for advice. Scope: one institution, one region, or (neither) all of mainland Portugal's SNS hospitals. Per period (latest first): visits_in_month and visits_year_to_date by type (general, paediatric, obstetric, psychiatric, total), triage_in_month by colour (red = immediate, orange = very urgent, yellow = urgent, green = less urgent, blue = non-urgent, white = not clinical / other) and triage_share_in_month_pct. Args:
institution: Hospital or ULS name, accent-insensitive ("Santa Maria", "São João",
"Hospital de Faro"). A hospital is mapped to its ULS; check |
| surgery_wait_statsA | 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):
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). |
| consultation_wait_statsA | 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). |
| search_datasetsA | Search the ~150 datasets of the SNS Transparency portal (titles and descriptions are in Portuguese). Use when the curated tools don't cover the question — e.g. hospital bed occupancy ("ocupação"), births/caesareans ("partos"), INEM pre-hospital calls, SNS 24 calls, family doctor coverage ("médico de família", "inscritos"), medicines spending, staff ("trabalhadores"), cancer screening ("rastreios"). Then call query_dataset with the dataset_id and the field names returned here. Portuguese keywords work best; matching is accent-insensitive. Args: query: Keywords, e.g. "ocupação internamento", "partos", "urgência". Empty = list all (id + title). limit: Max results (default 10, max 50; ignored when listing all). |
| query_datasetA | Run an ODSQL query on any SNS Transparency portal dataset (Opendatasoft Explore API v2.1). Use after search_datasets for anything the curated tools don't cover. Clauses are ODSQL:
Args: dataset_id: e.g. "ocupacao-do-internamento" (from search_datasets). where, select, group_by, order_by: ODSQL clauses (optional). limit: Rows to return (default 20, max 100). offset: Skip rows, for paging. |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
No prompts | |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
No resources | |
TDQS
Scored across 6 tools
Each tool has a clearly distinct role: find_institutions resolves names/places, the three *_stats tools cover separate official-statistics domains, and search_datasets/query_dataset form a clear metadata-search-then-query pattern. The descriptions explicitly guide agents to start with curated tools and fall back to generic dataset tools only when needed, so overlap is minimal.
All names use snake_case and are readable, but the set mixes two patterns: verb_noun action tools (find_institutions, search_datasets, query_dataset) and noun_stats statistics tools (emergency_stats, surgery_wait_stats, consultation_wait_stats). The conventions are internally predictable within each group, with only minor deviation from a single uniform pattern.
Six tools is well-scoped for an official SNS statistics server: one resolver, three curated statistics endpoints, and two generic dataset tools. None of the tools appear redundant, and the count is far from thin or unwieldy.
The surface covers institution lookup, the main curated hospital-activity domains (emergency, surgery, consultations), and arbitrary access to the remaining SNS Transparency datasets via search_datasets and query_dataset. Live waiting times are explicitly out of scope and users are directed to the official website, so there are no obvious dead ends for the stated purpose.