Skip to main content
Glama

CSS beautify / minify

css_format
Read-onlyIdempotent

Beautify or minify CSS from text or a file, with optional comment removal while preserving strings, url(...), escapes, and calc() spacing.

Instructions

Beautify CSS (one declaration per line, one selector per line, blank line between top-level rules, nested @media blocks) or minify it. Strings, url(...) and escapes are kept intact; calc() spacing is preserved. Optional comment removal (/*! … */ kept). Give "text" or a file "path". Web version: https://s3eidat.github.io/html-css-format/

Input Schema

NameRequiredDescriptionDefault
modeNo"beautify" (default) or "minify".beautify
pathNoOr: a path to a CSS file (UTF-8; use this for big inputs).
textNoThe CSS as inline text.
indentNoIndentation: 2, 4, "tab" (or any number of spaces 0-8).2
outputNoOptional: also write the result to this file path (or folder ending in "/"). The result text is then left out of the reply. Results over 1,000,000 characters are always written to a file.
removeCommentsNoDrop comments (/*! … */ license comments are kept).

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.1/5.0
Behavior4/5

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

Goes well beyond the annotations by disclosing preservation guarantees (strings, url(...), escapes, calc() spacing), the comment-removal behavior including that /*! ... */ license comments survive, and the 1,000,000-character threshold that forces file output. The one point of tension is that it describes writing results to a file while readOnlyHint=true, though that write is opt-in and does not alter the input.

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-loads the two modes and their concrete output shapes, then packs behavioral guarantees into a tight clause. Dense but nearly every clause carries information; the trailing web-version URL is the only element that does not help an agent invoke the tool.

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?

With six all-optional parameters and no output schema, the description does the needed work: it explains both modes, how input is supplied, and that the result is inlined in the reply unless an output path is given. It omits error behavior for malformed CSS or missing files, which is the remaining gap.

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 100%, so mode, indent, output, and removeComments semantics are already documented in structured fields; the description mostly mirrors rather than extends them. It does add the useful prompt that either text or path must be supplied, but no new detail on indent or output formatting rules.

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 (beautify/minify CSS) and immediately enumerates the concrete beautify output shape (one declaration per line, blank line between top-level rules, nested @media). It is clearly distinguishable from the neighboring css_clamp and css_units tools, which do not reformat source text.

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 gives actionable input routing ("Give 'text' or a file 'path'") and implies when to prefer the file path for large inputs, which the schema reinforces. It stops short of explicit exclusions or naming alternatives for cases like HTML or SQL formatting, so it is clear context without full routing.

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

Deploy Server

Other Tools