Skip to main content
Glama
alexrobl
by alexrobl

list_layers

List all layers in a spatial data source (FileGDB, GeoPackage, Shapefile, GeoJSON, KML, etc.) with names and geometry types. Safe for large catalogs and lock files, preventing OpenFileGDB hangs.

Instructions

Lista todas las capas disponibles en una fuente de datos espacial.

Soporta .gdb (FileGDB), .gpkg, .shp, .geojson, .kml y cualquier formato GDAL/OGR. Devuelve por capa: nombre y tipo de geometría, vía la enumeración liviana del catálogo (no abre cada capa individualmente) — seguro incluso en FileGDBs con cientos de capas o archivos .lock/.sr.lock residuales de ediciones previas en ArcGIS, donde abrir capa por capa puede colgar el driver OpenFileGDB.

Para feature_count, CRS, bbox y campos de una capa puntual usa get_layer_schema(layer=...).

Args: path: Ruta absoluta al archivo o directorio (.gdb es un directorio).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

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 provided, the description carries the behavioral disclosure burden. It does this well by revealing that enumeration is lightweight, does not open each layer individually, and is safe even with residual .lock/.sr.lock files. It could additionally state explicit read-only guarantees or error behavior, but the provided safety and performance context is substantial.

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?

The description is slightly longer than strictly necessary because of the .lock-file explanation, but that context serves behavioral transparency and is not wasted. The main action is front-loaded, and the alternative-tool routing is placed at the end, which is logical.

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 single-parameter tool, the description covers supported formats, what is returned per layer, and when to use a sibling tool. Since an output schema exists, the return structure need not be repeated. Nothing critical 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 input schema has 0% description coverage, so the description must compensate. The Args section does this: it explains that path is an absolute path, can point to a file or directory, and that .gdb is a directory. This adds meaning beyond the bare schema definition.

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 opens with a specific verb and resource: 'Lista todas las capas disponibles en una fuente de datos espacial.' It also differentiates itself from the sibling get_layer_schema by explicitly stating that detailed schema information belongs to that tool.

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?

It clearly explains when to use this tool (enumeration of layers) and when to use an alternative: 'Para feature_count, CRS, bbox y campos de una capa puntual usa get_layer_schema(layer=...).' This provides explicit routing guidance.

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