Skip to main content
Glama

Render style

render_style
Read-only

Render a MapLibre style to a PNG image and report style errors, failed requests, and missing fonts or icons.

Instructions

Renders a MapLibre style to a PNG image, so you can see what the style looks like, for example after changing it. Also reports what the renderer noticed, such as style errors, failed requests, and fonts and icons that are missing. Pass the style as an object, a URL or a file path. Without center, zoom or bounds, the camera stored in the style is used. For a view over 3D terrain, cameraPosition and lookAt place the camera in space, and the result gives the center, zoom, bearing and pitch of that view to store in the style.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
urlNoURL of a style JSON document.
pathNoPath to a style JSON file, relative to the directory the server runs in.
zoomNo
pitchNoTilt in degrees from looking straight down.
styleNoThe style as a JSON object.
widthNo
boundsNo[west, south, east, north] to fit the map to, instead of center and zoom.
centerNo[longitude, latitude] of the map center.
heightNo
lookAtNo[longitude, latitude] of the point on the ground that the camera at cameraPosition looks at, like a summit or a village.
bearingNoThe compass direction at the top of the map, in degrees.
rendererNoThe MapLibre renderer to draw with.gl-js
cameraPositionNo[longitude, latitude, altitude in metres] of the camera, to place it in space instead of with center, zoom, bearing and pitch. Needs lookAt.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changedv0.9.2
    • addedInput schema / properties / cameraPosition
      Added value: +{
      +  "description": "[longitude, latitude, altitude in metres] of the camera, to place it in space instead of with center, zoom, bearing and pitch. Needs lookAt.",
      +  "items": {
      +    "type": "number"
      +  },
      +  "maxItems": 3,
      +  "minItems": 3,
      +  "type": "array"
      +}
    • addedInput schema / properties / lookAt
      Added value: +{
      +  "description": "[longitude, latitude] of the point on the ground that the camera at cameraPosition looks at, like a summit or a village.",
      +  "items": {
      +    "type": "number"
      +  },
      +  "maxItems": 2,
      +  "minItems": 2,
      +  "type": "array"
      +}
  2. First observedv0.1.0

TDQS

A3.8/5.0
Behavior4/5

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

Annotations already cover safety (readOnlyHint, openWorldHint), so the bar is lower; the description still adds real behavioral detail: it reports renderer notices such as style errors, failed requests, and missing fonts/icons, and it discloses the camera-fallback rule when center/zoom/bounds are absent. It stops short of describing output format or size limits, but the added context is substantive.

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-loads what the tool does, then layers usage context, camera fallback, and the 3D path. Dense but every sentence carries information; the only slight drag is the three-input-forms sentence, which is arguably covered by schema.

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 13-parameter, no-output-schema tool, the description covers the key return information (diagnostics plus computed view parameters) and the main parameter interactions. Minor gaps remain around width/height/bearing/pitch guidance, but nothing critical to invoking it correctly is missing.

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?

Schema coverage is 77% (high-ish), so the baseline is 3, and the description exceeds it by explaining the mutually exclusive camera paths: center/zoom/bounds vs. the style's stored camera, and the 3D case where cameraPosition plus lookAt are required and the result returns center/zoom/bearing/pitch to store back. It also notes the style input may be an object, URL, or file path.

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?

States a specific verb and resource: 'Renders a MapLibre style to a PNG image'. It also clarifies the motivating use case ('so you can see what the style looks like'). It does not, however, distinguish itself from close siblings such as preview_style or show_map, which an agent would likely weigh against it.

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?

Gives implied context ('after changing it') and states the fallback rule when no camera params are supplied, which is useful selection guidance. But it never names an alternative or an exclusion, so the agent gets no explicit routing between this and preview_style/validate_style, whose domains overlap with the 'reports style errors' behavior.

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