Skip to main content
Glama
birkskyum
by birkskyum

Format style

format_style
Idempotent

Formats MapLibre styles with spec-ordered keys and two-space indentation. Formats files in place or returns formatted JSON for URL and object inputs.

Instructions

Formats a MapLibre style with the keys in the order of the style specification and two space indentation, the same way as gl-style-format. A style given as a file path is formatted in place, otherwise the formatted 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.2/5.0
Behavior4/5

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

Annotations already indicate idempotentHint=true and destructiveHint=false, and the description adds important behavioral context: formatting in place modifies the file, while passing a style object or URL returns formatted JSON. It also clarifies the exact formatting style (specification order, two-space indentation). The description does not contradict annotations; it complements them with mode-specific behavior.

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?

The description is a single, well-structured sentence that front-loads the core function and then clarifies the two modes. Every clause earns its place, and there is no redundant or vague wording.

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 formatting tool with no output schema, the description adequately explains what happens in each mode. It could be more complete by noting whether the URL input is fetched and formatted in memory or written back, and whether the style object is mutated. However, given the tool's simplicity and the annotations covering idempotency and non-destructiveness, the description is largely sufficient.

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 (url, path, style). The description adds the key behavioral distinction between path (in-place) and the other inputs (returned JSON), which is valuable. However, it does not explain how the three parameters interact (e.g., mutual exclusivity or precedence), so the description adds only moderate value beyond the schema.

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 clearly states the tool's function: it formats a MapLibre style with keys in specification order and two-space indentation, matching gl-style-format. It also distinguishes the two modes of operation (in-place file formatting vs. returning formatted JSON), which makes the purpose unambiguous and differentiates it from sibling tools like validate_style or render_style.

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?

The description explains the two usage modes: if a file path is given, the file is formatted in place; otherwise, the formatted JSON is returned. This gives clear context for when to use the tool. However, it does not explicitly state when not to use it or mention alternatives among siblings, so it falls just short of a 5.

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