Skip to main content
Glama

Add layers to a map

add_layers
Read-onlyIdempotent

Add markers, routes, proportional circles, pattern fills, annotations or labels to an existing map, and return the new URL.

Takes the svg_url of a map you already made. Everything on it is kept — this appends rather than replaces, so it is also how you build a map up over several turns.

Resolve coordinates with find_places before adding a marker. Guessed lat/lon lands in the wrong country and the render will not complain.

Use sea routes for shipping: they follow the lanes through Suez, Panama and Malacca instead of drawing a straight line over land.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "map": "<map>"
    },
    "name": "add_layers"
  }
}

Input Schema

NameRequiredDescriptionDefault
mapYesA map URL from a previous call. Everything already on it is kept.
labelsNo"ISO" labels every large region; an array labels only those ids.
routesNoA→B lines to add.
markersNoPoints to add.
patternsNoPer-region texture fills, for hatching a category onto a choropleth.
annotationsNoPer-region tooltip text.
proportionalNoCircles at region centroids, area proportional to value.

Output Schema

NameRequiredDescriptionDefault
embedYes
png_urlYesThe same map as PNG, 900 px wide unless the map sets width. The SVG has no such default and renders at 1200.
svg_urlYes
warningsYes
editor_urlYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.7/5.0
Behavior5/5

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

Discloses semantics that annotations cannot: the operation appends rather than replaces, existing content is preserved, and repeated calls are how a map is built over turns. The warning that guessed lat/lon "lands in the wrong country and the render will not complain" surfaces a silent-failure mode, which is high-value context beyond readOnlyHint/destructiveHint=false.

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 short paragraphs, each with a distinct job: what it does and returns, the append/non-destructive model, then two specific pitfalls. The append behavior is front-loaded and no sentence is filler.

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?

An output schema exists, so the URL return needs no elaboration, and the seven parameters are fully documented in the schema. For a multi-layer composition tool the description covers the essential mental model (append-only, coordinate resolution, sea lanes) and the failure mode that matters most.

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 description coverage is 100%, so the baseline is 3, but the description still adds rationale for the `routes.sea` flag (Suez/Panama/Malacca lanes vs. a great circle over land) that goes beyond the schema's terse variants. It does not explain `labels`/`annotations` id semantics, which the schema carries alone.

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?

Opens with a specific verb and resource ("Add markers, routes, proportional circles, pattern fills, annotations or labels to an existing map") and names the return value ("the new URL"). The enumerated layer types let an agent match its intent to this tool without opening the schema.

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?

Explicitly routes coordinate work to the sibling find_places ("Resolve coordinates with find_places before adding a marker") and gives a condition for sea routes. The phrase "the svg_url of a map you already made" implies the create-a-map-then-add workflow, but no explicit exclusion or ordering statement against create_map is given.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.