Skip to main content
Glama

render_map

Draw spatial query results, GeoJSON, or SQL geometries as a coloured PNG map with an OpenStreetMap basemap, and optionally save an interactive Leaflet HTML file.

Instructions

Draw a MAP and return it as a PNG image (with an OpenStreetMap basemap when online). Pass result_ids from earlier tools (find_features, within_distance, nearest, buffer, spatial_join, bbox_of, run_sql ...) - each becomes a coloured layer - or a GeoJSON string/object, or a SQL query that returns a geometry column. Also saves the PNG and, with save_html=true, an interactive Leaflet HTML map to disk. Use this whenever the answer is spatial.

Input Schema

NameRequiredDescriptionDefault
sqlNoRead-only SQL returning a geometry column (rendered as one layer).
titleNoMap title.
widthNo
heightNo
basemapNoDraw the OpenStreetMap basemap (needs internet). false = plain background.
geojsonNoA GeoJSON FeatureCollection/Feature/Geometry (object or JSON string).
save_htmlNoAlso write an interactive Leaflet HTML file.
result_idsNoresult_id values returned by other tools (drawn in order).
label_propertyNoFeature property to print as label (default: 'name' if few features).
value_propertyNoNumeric property for a graduated colour fill (choropleth), e.g. 'right_count' from spatial_join.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.2.0

TDQS

A4.2/5.0
Behavior4/5

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

With no annotations supplied, the description carries the full burden and does disclose key behavior: it always saves the PNG to disk, optionally writes a Leaflet HTML file, and degrades to a plain background when the OSM basemap is unavailable offline. It does not state the save location/filename or the shape of the returned payload, which matters for a tool that writes files.

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?

Three sentences, front-loaded with the core action and return format, then the input-source enumeration, then the usage trigger. The parenthetical sibling list is long but each item is functional and there is no filler.

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?

For a 10-parameter tool with no annotations and no output schema, the description covers input sources, side effects and offline fallback well. The remaining gaps are how sql/geojson/result_ids interact when multiple are supplied, and where saved files land or what the response contains.

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 80%, so the schema already explains sql, geojson, basemap, save_html, result_ids, label_property and value_property. The description mostly restates those (result_ids as coloured layers, grouped rendering order) and the 'right_count from spatial_join' hint duplicates the schema's choropleth note, adding little new meaning.

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 ('Draw a MAP and return it as a PNG image') plus the supported input modes. It reads nothing like its analysis-oriented siblings (find_features, spatial_join, run_sql), so an agent can distinguish it immediately.

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?

Gives a clear trigger ('Use this whenever the answer is spatial') and enumerates which sibling tools produce inputs (find_features, within_distance, nearest, buffer, spatial_join, bbox_of, run_sql), which is highly actionable. It stops short of stating when not to use it, or whether result_ids, geojson and sql are mutually exclusive or combinable.

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