Skip to main content
Glama
alexrobl
by alexrobl

export_map_cartographic

Generate a formal cartographic map with title, legend, scale, north arrow, and credits, plus a report of layer symbology. Use for deliverables needing a complete technical layout.

Instructions

Genera un mapa cartográfico técnico con layout formal completo: título institucional · panel lateral (leyenda, convenciones, índice de localización) · franja inferior (norte, escala, parámetros/fuente). Devuelve además un reporte textual de la simbología realmente aplicada a cada capa: VERIFICARLO antes de afirmar que un color/estilo cambió.

Usar para productos formales ("mapa cartográfico", "carta", "entrega", "producto"). Para exploración rápida usar export_map_image.

Args: path: Ruta al archivo o directorio espacial. layer: Nombre de la capa (None = primera capa). limit: Máximo de features (default 5000). color_by: Campo para colorear por categoría (colores automáticos). where: Filtro SQL OGR. Si se aplica, la extensión del mapa se ajusta (zoom) a las features filtradas; las capas extra quedan como contexto recortado sin ampliar la vista. bbox: Extensión [xmin, ymin, xmax, ymax] en el CRS de la capa. style: Estilo avanzado (mismo formato que export_map_image): Categorizado: {"type":"categorized","field":"X", "categories":{"A":"#e74c3c"}} Graduado: {"type":"graduated","field":"X", "ramp":"RdYlGn_r","breaks":5} output_path: Ruta de salida. .jpg para trabajo, .pdf para entrega. Default: "{capa}_cartographic.jpg" junto al archivo fuente. dpi: Resolución (default 150). Con dpi > 150 los tiles del basemap se piden a mayor zoom para mantener la nitidez (descarga más tiles: más lento). figsize: [ancho, alto] en pulgadas. Default auto-calculado. title: Título del mapa. Default: nombre de la capa. credits: Texto de fuente/créditos para el panel inferior. Ej: "Fuente: IGAC 2024 | Sistema: WGS84 EPSG:4326" label_by: Campo para etiquetar features de la capa PRINCIPAL (colocación inteligente, anclada en la parte visible de la geometría). Para etiquetar capas extra, usar la clave 'label_by' dentro de cada entrada de extra_layers. El reporte de salida SIEMPRE indica cuántas etiquetas se renderizaron y cuántas se omitieron (y por qué). label_collision: "auto" (default) descarta etiquetas solapadas o de polígonos que ocupan <0.02% de la vista; "none" renderiza TODAS las etiquetas visibles aunque se amontonen. extra_layers: Capas adicionales (mismo formato que export_map_image, incluidas las claves 'crs' para capas sin CRS definido, 'label_by' para etiquetar cada capa extra por su propio campo, 'where' para filtrarla por atributo, y 'color_by'/'style' para categorizarla sin dividir el archivo). IMPORTANTE: pasar SIEMPRE 'color' explícito y distinto por capa (matiz diferente) y 'label' descriptivo; el gris default es solo para capas de puro contexto. source_crs: CRS a asumir para la capa principal SOLO si el archivo no define uno (ej. "EPSG:3116"). Ver export_map_image. basemap: URL de un basemap alternativo al default Esri World Light Gray Canvas: raíz de un ArcGIS MapServer con cache de tiles en Web Mercator o plantilla XYZ con tokens {z}/{x}/{y}. Ver export_map_image. markersize: Tamaño del marcador para capas de puntos, en pt². Default None = automático según número de puntos y ancho del lienzo, con halo blanco. Ver export_map_image.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
dpiNo
bboxNo
pathYes
layerNo
limitNo
styleNo
titleNo
whereNo
basemapNo
creditsNo
figsizeNo
color_byNo
label_byNo
markersizeNo
source_crsNo
output_pathNo
extra_layersNo
label_collisionNoauto

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv0.2.10
    • addedInput schema / properties / label_collision
      Added value: +{
      +  "default": "auto",
      +  "title": "Label Collision",
      +  "type": "string"
      +}
  2. Addedv0.2.9

TDQS

A5/5.0
Behavior5/5

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

No annotations are present, so the description carries the full burden and does so thoroughly. It discloses the textual symbology report, label collision behavior, dpi/tile download implications, extent adjustment with filters, and the requirement to use explicit distinct colors for extra layers.

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 warranted given 18 parameters. It is well-structured with an Args list, inline JSON examples, and clear warnings. Key behavioral notes are front-loaded before the parameter list.

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 high parameter count and complexity, the description is complete: it covers defaults, output behavior, cautionary notes, and cross-references to sibling tools. The reported output schema and textual report are also mentioned, leaving little ambiguity.

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%, and the description compensates comprehensively by documenting all 18 parameters with defaults, ranges, formats, and examples. It adds meaning far beyond bare JSON schema types.

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 states a specific verb ('Genera un mapa cartográfico técnico con layout formal completo') and explicitly contrasts itself with export_map_image for quick exploration. It clearly identifies the resource and output type, so an agent can distinguish it from sibling tools.

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?

Directly states when to use this tool ('Usar para productos formales') and when not to ('Para exploración rápida usar export_map_image'). It also references export_map_image for shared parameters, giving clear routing guidance.

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