Skip to main content
Glama

generate_map

Render a print-ready map sheet from a QGIS project shape, including title, legend, north arrow, scale bar, grid, notes, and clipped layers, exporting to PDF, PNG, JPG, or TIF.

Instructions

Render one map sheet (PDF/PNG/JPG/TIF chosen by extension) over the project shape.

Includes title, legend, north arrow, scale bar, coordinate grid and notes. Clipped layers are saved to a GeoPackage next to the output. In QGIS the sheet is added to the Layout Manager (and opened when open_layout is true) so it can be edited there; headless, a .qgz project is saved next to it.

Args: output_path: Where to write the map, e.g. "C:/salidas/mapa_general.pdf". layers: Layer types to include (all added layers when omitted). page_size: A4, A3, A2, LETTER, LEGAL or TABLOID. extent: "project" zooms to the project shape, "layers" to all layers. margin_percent: Space around the project shape, in % of its size. sources: Data sources credited in the notes box. basemap: Background under the layers: "satelite" (Esri World Imagery), "google" (Google Satellite) or "osm" (OpenStreetMap). Needs internet; credited in the notes.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
dpiNo
gridNo
titleNo
extentNoproject
labelsNo
layersNo
basemapNo
sourcesNo
subtitleNo
page_sizeNoA4
open_layoutNo
orientationNolandscape
output_pathYes
margin_percentNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.6/5.0
Behavior4/5

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

With no annotations, the description carries the full burden and does so well: it discloses two side effects (clipped layers written to a GeoPackage, a .qgz project saved headless), the QGIS Layout Manager interaction gated on open_layout, and the internet dependency plus attribution requirement for basemaps. It stops short of stating whether an existing file at output_path is overwritten or whether parent directories are created.

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?

Front-loaded with the one-line purpose, then side effects, then a compact Args block; each sentence carries information. The prose and the Args list slightly overlap on open_layout and basemap, but the size is proportionate to a 14-parameter tool.

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

Completeness3/5

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

For a 14-parameter tool with zero annotations, no output schema and no schema descriptions, the description covers outputs, side effects and half the parameters, which is decent. It is nonetheless incomplete: six parameters (dpi, grid, title, subtitle, labels, orientation) have no meaning conveyed anywhere, and no return value is described.

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

Parameters3/5

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

Schema description coverage is 0%, so the description must compensate, and it documents roughly half the parameters (output_path format with example, layers, page_size values, extent modes, margin_percent units, sources, basemap options and their providers). dpi, grid, title, subtitle, labels and orientation are left entirely to the bare schema titles, so the gap is only partially filled.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The opening sentence gives a specific verb and resource ('Render one map sheet'), names the four output formats and how they are selected (by extension), and scopes it to the project shape. The singularity implied by 'one map sheet' distinguishes it from the generate_map_series sibling, though that contrast is never made explicit.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Usage is implied rather than stated: the agent learns that basemap 'Needs internet' and that open_layout=true opens the sheet in the Layout Manager. However, there is no explicit guidance on when to prefer this tool over generate_map_series or when the output would be inappropriate (e.g. no layers added).

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