Skip to main content
Glama

set_layer_layout

Set one MapLibre layout property on one skeleton layer of a hosted style (e.g. layer_id "road-path", property "line-cap", value "round"; null removes the property) and publish the result as a new immutable style version. Pair it with set_layer_paint for line patterns: dotted footpaths are road-path line-dasharray [0, 2] plus line-cap round. Layer ids come from list_style_layers. Returns the new version and style URL.

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": {
      "style_id": "<style_id>",
      "layer_id": "<layer_id>",
      "property": "<property>",
      "value": "<value>"
    },
    "name": "set_layer_layout"
  }
}

Input Schema

NameRequiredDescriptionDefault
valueYesThe layout value (any MapLibre-valid JSON, e.g. "round"), or null to remove the property and fall back to the skeleton's.
layer_idYesSkeleton layer id, e.g. "road-path". Call `list_style_layers` for the accepted ids.
propertyYesMapLibre layout property name, e.g. "line-cap", "line-join" or "visibility".
style_idYesHosted style id.

Output Schema

NameRequiredDescriptionDefault
versionYesThe newly published version.
style_idYesHosted style id.
style_urlYesImmutable URL of the compiled style at this version.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.2/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 well: it discloses the mutation effect (publishes a new immutable style version, so prior versions are not overwritten in place), the null-value fallback to the skeleton's value, and the return payload (new version and style URL). It omits auth/permission requirements and any error behavior, which is what keeps it from a 5.

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 dense sentences, front-loaded with the core action and scope, then the sibling pairing, then the id source and return value. No filler and nothing repeated verbatim from the 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 mutation tool with no annotations, it covers what an agent needs to call it correctly: single-property scope, immutable-version side effect, null removal, id provenance, and output. An output schema exists so return values need not be expanded further; only permissions and failure modes are unaddressed.

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 all four parameters are already documented with examples and the null-removal semantics. The description adds only marginal extra meaning, mainly showing how a layout value interacts with a paint value for the dotted-footpath pattern; baseline 3 is appropriate when the schema does the heavy lifting.

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 precise verb and narrow scope: set ONE MapLibre layout property on ONE skeleton layer of a hosted style, with a concrete worked example (layer_id "road-path", property "line-cap", value "round"). It is immediately distinguishable from set_layer_paint (paint vs layout) and from list_style_layers (id discovery).

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 explicit context for when this tool applies (layout properties only, one at a time), names the complementary sibling set_layer_paint, and explains that layer ids come from list_style_layers. It stops short of a hard when-not statement (e.g. 'for paint properties use set_layer_paint instead' or 'multiple properties require multiple calls'), but the routing is clear.

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