Skip to main content
Glama

get_territorial_codes

Resolve Italian place names to official ISTAT territorial codes, with optional level filtering for comuni, province, or regions. Offline, case-insensitive lookup for 8,039 codes.

Instructions

Instant offline lookup across 8,039 official ISTAT REF_AREA territorial codes (Comuni, Province, Regioni, Ripartizioni). Case-insensitive on name, REF_AREA code and ISTAT code. Example: search='Grosseto', level='comune' -> 053011.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
levelNoFiltro opzionale sul livello amministrativo. Omesso = tutti i livelli. Utile per distinguere il comune di Grosseto (053011) dalla provincia (053).
limitNoNumero massimo di risultati (default 10).
searchYesNome del territorio o codice REF_AREA da risolvere. Esempi: 'Grosseto', 'Toscana', '053011', 'ITE1'. Ricerca case-insensitive.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Behavior4/5

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

With no annotations provided, the description carries the burden of behavioral disclosure. It adds key traits: offline operation, case-insensitive search, and the ability to match by three fields (name, REF_AREA, ISTAT). It also gives a concrete example that illustrates expected input/output behavior. It does not mention error handling or edge cases, but for a simple lookup tool this is a reasonably transparent description.

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 exceptionally concise: two sentences that convey the tool's purpose, scope, matching behavior, and a worked example. There is no filler or repetition; every clause adds information. The example is well-placed and illustrative.

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?

Given the tool's simplicity, the complete parameter schema, and the presence of an output schema, the description is fully adequate. It explains what the tool does, how it matches, and what one can expect from a query. No critical information is missing for an agent to select and invoke this tool correctly.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The schema already covers all three parameters with descriptions (100% coverage), so baseline is 3. The description adds value by clarifying that 'search' can match on name, REF_AREA code, and ISTAT code, and by providing a concrete example that ties 'search' and 'level' together. This goes slightly beyond the schema's individual descriptions.

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 clearly states the tool performs an offline lookup for ISTAT territorial codes, enumerates the levels (Comuni, Province, Regioni, Ripartizioni), and gives an example. It distinguishes itself from sibling tools (which handle constraints, concepts, dataflows, etc.) by specifying a concrete lookup resource and 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?

The description implies when to use this tool: any time a user needs to resolve or search territorial names or codes. It provides context with the example and mentions case-insensitivity and the optional level filter. However, it does not explicitly state when not to use it or directly reference alternatives among sibling tools, so it misses full exclusionary guidance.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/ManoloZocco/istat-mcp-suite'

If you have feedback or need assistance with the MCP directory API, please join our Discord server