Skip to main content
Glama

Restyle a layer (direct)

restyle_layer
Idempotent

Adjust a layer's color and/or opacity. Within-palette changes only — the renderer silently ignores fields the current viz variant doesn't support. Pass at least one of color / opacity; passing neither is an accepted no-op.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
colorNoCSS color string: hex (#RRGGBB), rgb/rgba, or named color.
map_idYes
layerIdYes
opacityNo0 (transparent) to 1 (opaque).
rationaleNoOptional short label (≤300 chars) for the map edit history, e.g. "add wildfire layer". Omit it to send nothing beyond the tool arguments.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changed
    • changedInput schema / properties / rationale / description
      Previous value: -"Short audit-log label (≤300 chars) stating the user-facing goal this call serves, e.g. \"add wildfire layer for the user's California query\". Required on every call. Stored in the operations log so map edits stay traceable — we never see your chat history."New value: +"Optional short label (≤300 chars) for the map edit history, e.g. \"add wildfire layer\". Omit it to send nothing beyond the tool arguments."
    • changedInput schema / required
      Previous value: -[
      -  "map_id",
      -  "layerId",
      -  "rationale"
      -]New value: +[
      +  "map_id",
      +  "layerId"
      +]
  2. First observed

TDQS

A4/5.0
Behavior4/5

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

Annotations already declare idempotentHint=true, destructiveHint=false, and readOnlyHint=false, so the mutability profile is covered. The description adds genuinely useful behavioral detail beyond them: the renderer 'silently ignores fields the current viz variant doesn't support' and a no-op is accepted, which the agent could not infer from structured fields.

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 tight sentences, front-loaded with the core action before the caveats. The scope constraint and no-op behavior are stated in the fewest words possible, and nothing is repetitive.

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 output schema, the description adequately conveys what changes, the scope limit, and the no-op edge case, and annotations carry the safety profile. The only gap is that the required map_id/layerId parameters are never explained anywhere.

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 coverage is 60%; color and opacity are documented in the schema with format/range, and the description adds the constraint that at least one is required and that unsupported ones are silently dropped. However, the two required identifiers (map_id, layerId) have no description text in either the schema or the description.

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 ('Adjust a layer's color and/or opacity'), which inherently separates it from siblings like rename_layer or filter_layer. It never names an alternative explicitly, so the differentiation is achieved through specificity rather than routing.

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 clear usage constraints: 'within-palette changes only' and 'Pass at least one of color / opacity; passing neither is an accepted no-op.' This tells the agent the operational envelope, but no alternative sibling (e.g. a deeper mutate/restyle tool) is named for cases outside the palette.

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