Skip to main content
Glama

DatiTuristici.it

Read tourism figures of an Italian comune

leggi_dati_comune
Read-onlyIdempotent

Reads one Italian comune's nights, arrivals, bed places, establishments and population for a year, and returns its profilo (altitude, surface, coordinates, UNESCO sites, tourism pressure). Use it with the cod_istat that cerca_comune returns; do not use it for a trend (use leggi_serie_comune instead) or several comuni (use confronta_comuni instead). anno picks the year of nights and arrivals; without it the latest with data is used. Bed places and establishments are the latest published, up to anno when given; population and the profile keep their own years. A missing figure is null; an unknown code or a year outside the comune's span of data is an error saying what to pass. Public, no authentication; 30 requests per minute per client, shared across tools.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "cod_istat": "<cod_istat>"
    },
    "name": "leggi_dati_comune"
  }
}

Input Schema

NameRequiredDescriptionDefault
annoNoYear, e.g. 2024; default: the latest year with data.
cod_istatYes6-digit ISTAT code of the comune, as a string with leading zeros kept ("058091" is Roma).

Output Schema

NameRequiredDescriptionDefault
annoNoYear of the movement figures (presenze and arrivi): `anno_richiesto`, or the latest year with data when it was omitted; null if the comune has no tourism data.
nomeYesOfficial name of the comune.
notaNoNotes in English on reading the figures, null when there is nothing to say: from 2025 ISTAT counts include privately rented holiday flats, so any change that spans 2025 includes the new accommodation, not only more tourists; capacity from a year other than `anno`; a year or a comune without movement figures; a comune without a `profilo`.
fonteYesSource to cite with the figures: processed by DatiTuristici.it from institutional data (ISTAT).
schedaYesLink to the comune's public page on datituristici.it, to cite.
profiloNoThe comune's territorial profile, the free Territorial profile section of its page, without the two seasonal indices (leggi_affluenza_mensile gives them): altitude, surface, coordinates, UNESCO World Heritage sites and two tourism-pressure ratios, with the year of each group in `anni` and its own `fonte`. Null when no profile is recorded for the comune or this server does not serve it; `nota` then says which.
regioneNoRegion as recorded by ISTAT (Bolzano and Trento are provinces of TRENTINO-ALTO ADIGE); null if not recorded.
eserciziNoNumber of accommodation establishments in `anno_capacita`; null if not available.
cod_istatYes6-digit ISTAT code of the comune, as a string with leading zeros kept.
provinciaNoProvince (or metropolitan city) as recorded by ISTAT; null if not recorded.
popolazioneNoResident population in `popolazione_anno` (the latest year loaded, whatever `anno` is); null if not available.
posti_lettoNoBed places in accommodation establishments in `anno_capacita`: the ISTAT total, or hotel plus non-hotel beds where the total is missing, as on the site; null if not available.
anno_capacitaNoYear of the capacity figures (bed places and establishments): with `anno`, the latest year published up to it; without, the latest year published, as on the comune's page. It can be earlier or later than `anno`, and `nota` then gives both years; null if none is published.
arrivi_totaliNoGuest arrivals (check-ins) at accommodation establishments during `anno`; null if not available.
anno_richiestoNoThe `anno` argument as given; null when it was omitted.
arrivi_italianiNoArrivals of guests resident in Italy during `anno`; null if not available.
presenze_totaliNoNights spent by all guests in accommodation establishments during `anno` (one guest staying three nights counts three); null if not available.
anni_disponibiliNoFirst and last year with movement figures for this comune, the accepted range of `anno`; null if the comune has none.
arrivi_stranieriNoArrivals of guests resident abroad during `anno`; null if not available.
popolazione_annoNoReference year of `popolazione`; null if not available.
presenze_italianiNoNights spent by guests resident in Italy during `anno`; null if not available.
presenze_stranieriNoNights spent by guests resident abroad during `anno`; null if not available.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedOutput schema / properties / nota / description
      Previous value: -"Notes in English on reading the figures, null when there is nothing to say: from 2025 ISTAT counts include privately rented holiday flats, so totals and non-hotel figures are not comparable with years before 2025 (hotel figures are); capacity from a year other than `anno`; a year or a comune without movement figures; a comune without a `profilo`."New value: +"Notes in English on reading the figures, null when there is nothing to say: from 2025 ISTAT counts include privately rented holiday flats, so any change that spans 2025 includes the new accommodation, not only more tourists; capacity from a year other than `anno`; a year or a comune without movement figures; a comune without a `profilo`."
  2. Changed2 schema fields changed
    • changedInput schema / properties / anno / description
      Previous value: -"Year of the figures, e.g. 2024; default: the latest year with data for this comune. A year outside its years with data returns an error that gives them."New value: +"Year, e.g. 2024; default: the latest year with data."
    • changedInput schema / properties / cod_istat / description
      Previous value: -"6-digit ISTAT code of the comune as a string, leading zeros kept (\"058091\" is Roma); it comes from cerca_comune."New value: +"6-digit ISTAT code of the comune, as a string with leading zeros kept (\"058091\" is Roma)."
  3. Changed1 schema field changed
    • changedOutput schema / properties / profilo / description
      Previous value: -"The comune's territorial profile, the free Territorial profile section of its page, without the two seasonal indices shown on the site: altitude, surface, coordinates, UNESCO World Heritage sites and two tourism-pressure ratios, with the year of each group in `anni` and its own `fonte`. Null when no profile is recorded for the comune or this server does not serve it; `nota` then says which."New value: +"The comune's territorial profile, the free Territorial profile section of its page, without the two seasonal indices (leggi_affluenza_mensile gives them): altitude, surface, coordinates, UNESCO World Heritage sites and two tourism-pressure ratios, with the year of each group in `anni` and its own `fonte`. Null when no profile is recorded for the comune or this server does not serve it; `nota` then says which."
  4. Changed1 schema field changed
    • changedOutput schema / properties / profilo / description
      Previous value: -"The comune's territorial profile, the same data as the Territorial profile section of its page: altitude, surface, coordinates, UNESCO World Heritage sites and two tourism-pressure ratios, with the year of each group in `anni` and its own `fonte`. Null when no profile is recorded for the comune or this server does not serve it; `nota` then says which."New value: +"The comune's territorial profile, the free Territorial profile section of its page, without the two seasonal indices shown on the site: altitude, surface, coordinates, UNESCO World Heritage sites and two tourism-pressure ratios, with the year of each group in `anni` and its own `fonte`. Null when no profile is recorded for the comune or this server does not serve it; `nota` then says which."
  5. Changed7 schema fields changed
    • addedOutput schema / properties / profilo / properties / anni / properties / arrivi
      Added value: +{
      +  "description": "Reference year of the arrivals used in `arrivi_per_abitante`: the latest year with movement figures; null if that group is not available.",
      +  "type": [
      +    "integer",
      +    "null"
      +  ]
      +}
    • changedOutput schema / properties / profilo / properties / anni / properties / popolazione / description
      Previous value: -"Reference year of the resident population used in `presenze_per_abitante`: the year closest to `anni.presenze`, which can differ from it; null if that group is not available."New value: +"Reference year of the resident population used in `arrivi_per_abitante`: the year closest to `anni.arrivi`, which can differ from it; null if that group is not available."
    • removedOutput schema / properties / profilo / properties / anni / properties / presenze
      Removed value: -{
      -  "description": "Reference year of the nights spent used in `presenze_per_abitante`: the latest year with movement figures; null if that group is not available.",
      -  "type": [
      -    "integer",
      -    "null"
      -  ]
      -}
    • changedOutput schema / properties / profilo / properties / anni / required
      Previous value: -[
      -  "classificazioni",
      -  "presenze",
      -  "popolazione",
      -  "posti_letto",
      -  "wikidata"
      -]New value: +[
      +  "classificazioni",
      +  "arrivi",
      +  "popolazione",
      +  "posti_letto",
      +  "wikidata"
      +]
    • addedOutput schema / properties / profilo / properties / arrivi_per_abitante
      Added value: +{
      +  "description": "Tourism pressure: arrivals in the latest year with movement figures (`anni.arrivi`) per resident (population of `anni.popolazione`), rounded to two decimals; null if a term is missing. Arrivals are guests checked in, not nights.",
      +  "type": [
      +    "number",
      +    "null"
      +  ]
      +}
    • removedOutput schema / properties / profilo / properties / presenze_per_abitante
      Removed value: -{
      -  "description": "Tourism pressure: nights spent in the latest year with movement figures (`anni.presenze`) per resident (population of `anni.popolazione`), rounded to two decimals; null if a term is missing. Nights are not people.",
      -  "type": [
      -    "number",
      -    "null"
      -  ]
      -}
    • changedOutput schema / properties / profilo / required
      Previous value: -[
      -  "zona_altimetrica",
      -  "altitudine_m",
      -  "litoraneo",
      -  "isolano",
      -  "montano",
      -  "grado_urbanizzazione",
      -  "superficie_kmq",
      -  "presenze_per_abitante",
      -  "posti_letto_per_kmq",
      -  "lat",
      -  "lon",
      -  "siti_unesco",
      -  "anni",
      -  "fonte"
      -]New value: +[
      +  "zona_altimetrica",
      +  "altitudine_m",
      +  "litoraneo",
      +  "isolano",
      +  "montano",
      +  "grado_urbanizzazione",
      +  "superficie_kmq",
      +  "arrivi_per_abitante",
      +  "posti_letto_per_kmq",
      +  "lat",
      +  "lon",
      +  "siti_unesco",
      +  "anni",
      +  "fonte"
      +]
  6. Changed2 schema fields changed
    • changedOutput schema / properties / nota / description
      Previous value: -"Notes in English on reading the figures, null when there is nothing to say: from 2025 ISTAT counts include privately rented holiday flats, so totals and non-hotel figures are not comparable with years before 2025 (hotel figures are); capacity from a year other than `anno`; a year or a comune without movement figures."New value: +"Notes in English on reading the figures, null when there is nothing to say: from 2025 ISTAT counts include privately rented holiday flats, so totals and non-hotel figures are not comparable with years before 2025 (hotel figures are); capacity from a year other than `anno`; a year or a comune without movement figures; a comune without a `profilo`."
    • addedOutput schema / properties / profilo
      Added value: +{
      +  "description": "The comune's territorial profile, the same data as the Territorial profile section of its page: altitude, surface, coordinates, UNESCO World Heritage sites and two tourism-pressure ratios, with the year of each group in `anni` and its own `fonte`. Null when no profile is recorded for the comune or this server does not serve it; `nota` then says which.",
      +  "properties": {
      +    "altitudine_m": {
      +      "description": "Altitude of the comune's centre in metres above sea level (ISTAT); null if not available.",
      +      "type": [
      +        "integer",
      +        "null"
      +      ]
      +    },
      +    "anni": {
      +      "description": "The reference year of each group of the profile, only of what was used; null where the group is not available.",
      +      "properties": {
      +        "classificazioni": {
      +          "description": "Reference year of the ISTAT group (`altitudine_m`, `superficie_kmq` and the classifications): the year the file refers to; null if that group is not available.",
      +          "type": [
      +            "integer",
      +            "null"
      +          ]
      +        },
      +        "popolazione": {
      +          "description": "Reference year of the resident population used in `presenze_per_abitante`: the year closest to `anni.presenze`, which can differ from it; null if that group is not available.",
      +          "type": [
      +            "integer",
      +            "null"
      +          ]
      +        },
      +        "posti_letto": {
      +          "description": "Reference year of the bed places used in `posti_letto_per_kmq`: the latest year of the accommodation establishments; null if that group is not available.",
      +          "type": [
      +            "integer",
      +            "null"
      +          ]
      +        },
      +        "presenze": {
      +          "description": "Reference year of the nights spent used in `presenze_per_abitante`: the latest year with movement figures; null if that group is not available.",
      +          "type": [
      +            "integer",
      +            "null"
      +          ]
      +        },
      +        "wikidata": {
      +          "description": "Reference year of the Wikidata group (`lat`, `lon`, `siti_unesco`): the year read; null if that group is not available.",
      +          "type": [
      +            "integer",
      +            "null"
      +          ]
      +        }
      +      },
      +      "required": [
      +        "classificazioni",
      +        "presenze",
      +        "popolazione",
      +        "posti_letto",
      +        "wikidata"
      +      ],
      +      "type": "object"
      +    },
      +    "fonte": {
      +      "description": "Sources to cite with the profile: processed by DatiTuristici.it from institutional data (ISTAT) and Wikidata (CC0).",
      +      "type": "string"
      +    },
      +    "grado_urbanizzazione": {
      +      "description": "Degree of urbanisation (ISTAT): 1 city, 2 towns and suburbs, 3 rural areas; null if not available.",
      +      "type": [
      +        "integer",
      +        "null"
      +      ]
      +    },
      +    "isolano": {
      +      "description": "True if the comune is on an island, false if not (ISTAT); null if not available.",
      +      "type": [
      +        "boolean",
      +        "null"
      +      ]
      +    },
      +    "lat": {
      +      "description": "Latitude of the comune in degrees (Wikidata, WGS 84); null if not available, including the few comuni with two different points, none of which is chosen.",
      +      "type": [
      +        "number",
      +        "null"
      +      ]
      +    },
      +    "litoraneo": {
      +      "description": "True if the comune is on the coast, false if not (ISTAT); null if not available.",
      +      "type": [
      +        "boolean",
      +        "null"
      +      ]
      +    },
      +    "lon": {
      +      "description": "Longitude of the comune in degrees (Wikidata, WGS 84); null when `lat` is null.",
      +      "type": [
      +        "number",
      +        "null"
      +      ]
      +    },
      +    "montano": {
      +      "description": "Mountain classification of the comune (ISTAT): T entirely mountain, P partly mountain, NM not mountain; null if not available.",
      +      "enum": [
      +        "T",
      +        "P",
      +        "NM",
      +        null
      +      ],
      +      "type": [
      +        "string",
      +        "null"
      +      ]
      +    },
      +    "posti_letto_per_kmq": {
      +      "description": "Bed places in the latest year of the accommodation establishments (`anni.posti_letto`) per square kilometre of `superficie_kmq`, rounded to two decimals; null if a term is missing.",
      +      "type": [
      +        "number",
      +        "null"
      +      ]
      +    },
      +    "presenze_per_abitante": {
      +      "description": "Tourism pressure: nights spent in the latest year with movement figures (`anni.presenze`) per resident (population of `anni.popolazione`), rounded to two decimals; null if a term is missing. Nights are not people.",
      +      "type": [
      +        "number",
      +        "null"
      +      ]
      +    },
      +    "siti_unesco": {
      +      "description": "Number of UNESCO World Heritage sites located in the comune (Wikidata), a count taken from Wikidata as it is; 0 if none; null if the comune is not in Wikidata.",
      +      "type": [
      +        "integer",
      +        "null"
      +      ]
      +    },
      +    "superficie_kmq": {
      +      "description": "Surface area of the comune in square kilometres (ISTAT); null if not available.",
      +      "type": [
      +        "number",
      +        "null"
      +      ]
      +    },
      +    "zona_altimetrica": {
      +      "description": "Altimetric zone of the comune (ISTAT): 1 inland mountain, 2 coastal mountain, 3 inland hill, 4 coastal hill, 5 plain; null if not available.",
      +      "type": [
      +        "integer",
      +        "null"
      +      ]
      +    }
      +  },
      +  "required": [
      +    "zona_altimetrica",
      +    "altitudine_m",
      +    "litoraneo",
      +    "isolano",
      +    "montano",
      +    "grado_urbanizzazione",
      +    "superficie_kmq",
      +    "presenze_per_abitante",
      +    "posti_letto_per_kmq",
      +    "lat",
      +    "lon",
      +    "siti_unesco",
      +    "anni",
      +    "fonte"
      +  ],
      +  "type": [
      +    "object",
      +    "null"
      +  ]
      +}
  7. First observed

TDQS

A4.9/5.0
Behavior5/5

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

Annotations already declare readOnly, idempotent, non-destructive and closed-world, and the description goes well beyond them: missing figures are returned as null, unknown codes or out-of-range years produce an error that names the valid input, and it discloses the auth model (public, none) and the rate limit (30 req/min shared across tools). That is exactly the operational context annotations cannot carry.

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?

Purpose first, then the code source, then explicit exclusions, then the per-field year rules, then error/null behavior and limits. Every sentence carries distinct information; nothing is repeated from the schema or annotations.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Complete for an agent to call it correctly: inputs, defaults, error semantics, freshness rules and rate limits are all covered, and an output schema exists so return shapes need not be re-explained. The only small gap is that the prose slightly restates `profilo` contents that the output schema likely already documents.

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 coverage is already 100%, but the description adds real semantics the schema does not: `anno` governs only the year of nights and arrivals, defaults to the latest year with data, bed places and establishments are capped at `anno`, while population and profile keep their own reference years. That asymmetric year behavior is critical and exists only in the prose.

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?

States a specific verb and resource with the exact scope: one comune's nights, arrivals, bed places, establishments and population for a year, plus a `profilo` block. It also names what it is not (trend data, multi-comune comparison), so an agent can distinguish it from leggi_serie_comune and confronta_comuni without opening any 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?

Explicitly routes the agent: pair it with the `cod_istat` from cerca_comune, and do not use it for trends (use leggi_serie_comune) or several comuni (use confronta_comuni). Both the positive path and the two exclusions are stated, which is the top of the scale.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources