Skip to main content
Glama

snippet

Read-only

The code that puts a map on a page with a publishable key: a plain HTML version (one element and one script tag, no build step, works in any CMS), an npm/SDK version for a bundled app, the same map as a component for a React, Vue, Svelte or Angular app or a NativeScript phone app (each with its package to install), our Leaflet and OpenLayers plugins for raster maps (one load per map start, like the vector map), and an XYZ raster tile URL for tools that only take a tile URL (QGIS, WordPress map plugins; every 50 raster tiles count as one map load). Give the human the one that fits their site. Pair it with a built-in look or a published style URL from list_styles.

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": {
      "key_id": "<key_id>"
    },
    "name": "snippet"
  }
}

Input Schema

NameRequiredDescriptionDefault
zoomNoInitial zoom, 0 to 20. Default 11.
styleNoA built-in look (meadow, midnight, neon, vintage, blueprint, sakura) or a published style URL. Default meadow.
centerNoMap centre as [longitude, latitude]. Default Dublin.
key_idYesA publishable key's id (uuid). Secret keys never go in a page.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A3.7/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true and openWorldHint=false, so the safety profile is covered. The description adds useful behavioral context beyond annotations: it explains the distinct snippet formats, notes that Leaflet/OpenLayers use one load per map start, and clarifies that every 50 XYZ raster tiles count as one map load. It also reinforces that only a publishable key belongs in a page.

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?

The description is front-loaded with the core purpose and then lists output variants efficiently. The long first sentence is dense but each variant is relevant for choosing the right snippet; there is little fluff, though it could be broken up for readability.

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?

With no output schema, the description does the heavy lifting by explaining what kinds of code snippets are returned and when each is appropriate. It also covers the publishable-key constraint and style pairing, leaving only the sibling-tool distinction (especially versus map_code) underdeveloped.

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 100%, so the baseline is 3. The description adds some value by linking the style parameter to list_styles and emphasizing the publishable key constraint, but it does not add meaning for center, zoom, or other parameter details beyond what the schema already documents.

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 description clearly states the tool produces embeddable map code using a publishable key, and it enumerates the output variants (HTML, npm/SDK, framework components, Leaflet/OpenLayers, XYZ tile URL). However, it does not differentiate itself from the sibling map_code tool, leaving potential ambiguity about which code-generation tool to choose.

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?

It gives output-selection guidance ('Give the human the one that fits their site') and says to pair the snippet with a built-in look or published style from list_styles. But it does not explicitly state when to use this tool versus map_code or other siblings, nor does it provide exclusions or prerequisites.

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.

Resources