Skip to main content
Glama
Magic Lane MCP DevKit Server

Magic Lane MCP DevKit Server

Official
by magiclane

Update Style Content

update_style
DestructiveIdempotent

Save a complete map style in Magic Lane Studio by replacing its full JSON with a version check; conflicting edits are refused so existing work is not overwritten.

Instructions

Saves the new content of the style in Magic Lane Studio: replaces the complete style JSON of one of your styles. Always send the full document (edit the "data" from get_style and send it back) and the "version" you read as baseVersion; if the style was saved since (for example in Studio) the write is refused with a conflict and nothing changes — read again, compare, and resend deliberately, never automatically. For a large style, send a file instead of data: first read the "version" with get_style (includeData: false), then download_style it with a path, edit the file, and pass that path here (exactly one of data and path) with that version as baseVersion. The document then never has to pass through the conversation, and a save made in Studio after the download is refused, not overwritten. A version read after the edit would let that save be overwritten. By default the document is validated offline first, reporting every schema problem with its path. A saved document that still has something to fix comes back with warnings: fix them, save again and tell the user what you fixed; if one cannot be fixed or the user keeps it, say so and leave it (warnings never block a save). Name, description, tags and purposes are untouched (use edit_style_details). Requires "Studio: Read & write". The style format, with its traps (colours are ABGR integers): get_style_reference: the essentials with no arguments (resource magiclane://docs/style-essentials), the full format with page "style-file-format" (https://developer.magiclane.com/docs/guides/map-studio/reference/style-file-format/). Publishing, reverting and deleting styles, previews, thumbnails and privacy settings are Studio actions (https://developer.magiclane.com/studio) and are not available through these tools; a save here only saves.

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": {
      "id": "<id>",
      "baseVersion": "<baseVersion>"
    },
    "name": "update_style"
  }
}

Input Schema

NameRequiredDescriptionDefault
idYesId of one of your styles (UUID); a template cannot be changed.
dataNoThe complete new style JSON. Replaces the whole content; partial documents are not merged.
pathNoPath of a style JSON file on this computer, used instead of data, for example a file written by download_style and then edited. Prefer an absolute path: a relative one is taken from the folder MAGICLANE_FILES_DIR names when the server has one, otherwise the server's working directory, which may not be yours. A path that starts with ~/ or ~user/ is refused: ~ is not read as a home folder.
baseVersionYesThe "version" string of the style as last read (from get_style, list_styles, create_style or a previous write), unchanged. Opaque: never parse or edit it. If the style was saved since (for example in Studio) the write is refused with a conflict and nothing changes.
validateOfflineNoValidate the document against the bundled engine style schema before sending (default true). The portal reports only the first schema problem; the offline check reports all of them with paths and saves a round-trip.

Output Schema

NameRequiredDescriptionDefault
idYesStyle id.
fromNoThe style file the JSON was read from: on the local server only.
noteYesThings to know about this result.
savedYesThe content was saved.
updatedYesWhen it was saved, ISO date-time.
versionYesThe new version: pass it as baseVersion to the next write.
warningsNoWhat to fix in the style. Fix them before saving (or save again), also when they came from a template: apply each "fix", ask the user where askUser is true, make the change the message names where there is neither, and tell the user what you fixed. If one cannot be fixed, or the user keeps it, say so and leave it: warnings never block a save. Only the checks this server makes: an empty list does not mean Studio shows no warning.
warningsTruncatedNowarnings counted but not listed: validate again after fixing the listed ones.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

A4.8/5.0
Behavior5/5

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

Though annotations already flag destructive/write behavior, the description adds substantial context beyond them: optimistic-concurrency conflict refusal with no changes applied, the hazard of reading the version after editing, offline validation with all schema errors reported, non-blocking warnings, and the 'Studio: Read & write' permission requirement. It also scopes out publishing, reverting, deleting, previews and privacy settings.

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?

Front-loaded with the core action and the destructive-replace warning, and every section is relevant. It is densely packed and the closing paragraph on Studio-only actions and documentation links is longer than strictly necessary, but nothing is padding in the sense of repetition.

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?

For a destructive, nested-schema write tool this covers everything an agent needs: full-replace semantics, versioning and conflict handling, the two alternative input modes, validation behavior, permission requirement, and pointers to the style format reference and traps (ABGR colours). Return-value details are covered by the output schema, so their absence in the description is appropriate.

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 coverage is 100%, so the schema already documents each parameter; the description still adds meaning beyond it, notably the exactly-one-of `data`/`path` constraint (not expressed in the schema) and why `baseVersion` must be read before the edit. `validateOffline` behavior is expanded with the round-trip rationale, though the individual nested schema fields are left to the schema itself.

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 specific verb and resource up front — 'Saves the new content of the style ... replaces the complete style JSON of one of your styles' — and immediately clarifies it does not touch name, description, tags or purposes, routing that to edit_style_details. An agent can distinguish this from sibling tools without opening a schema.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Explicit guidance on when to use which mode: send full `data` for small styles, `path` for large ones after downloading; exactly one of data/path. It also prescribes the read-edit-save order, tells the agent to re-read and compare on conflict, never retry automatically, and says what to do with validation warnings. Alternatives (edit_style_details, get_style, download_style) are named with the condition that selects them.

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