Skip to main content
Glama
birkskyum
by birkskyum

Migrate style

migrate_style
Idempotent

Converts outdated MapLibre styles to the current specification: version 7 to 8, legacy functions and filters to expressions. Accepts a file path to update in place or returns migrated JSON.

Instructions

Migrates an old style to the current MapLibre Style Specification, the same way as gl-style-migrate: version 7 styles become version 8, and legacy functions and filters become expressions. A style given as a file path is migrated in place, otherwise the migrated JSON is returned.

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.
styleNoThe style as a JSON object.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4/5.0
Behavior4/5

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

Annotations already cover the safety profile (readOnly=false, idempotent=true, destructive=false). The description adds meaningful behavioral context beyond those annotations: file-path styles are migrated in place while others return migrated JSON, and it specifies what the migration actually changes. No contradiction with annotations.

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?

Two sentences with no filler. The core operation, transformation details, and side-effect behavior are all present and front-loaded, with no redundant restatement of the title or 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 tool with three optional parameters and no output schema, the description covers the input modes, the transformation scope, and the return behavior. It lacks only minor details such as error handling and explicit mutual exclusivity of parameters, but is otherwise sufficient for an agent to invoke it correctly.

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 schema already documents all three parameters. The description adds the important behavioral distinction between path-based in-place migration and other inputs returning JSON, but this is behavioral rather than parametric; the baseline of 3 is appropriate.

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?

The description states a specific verb and resource: 'Migrates an old style to the current MapLibre Style Specification.' It adds concrete transformation details (v7 to v8, legacy functions/filters to expressions) and names gl-style-migrate, making its scope clear and distinguishing it from siblings such as format_style and validate_style.

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?

The description gives clear context for when the tool is used—migrating old styles—and explains the path vs. non-path behavior. However, it does not explicitly say when not to use it or name alternatives, leaving the agent to infer from sibling names rather than being directed.

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