Skip to main content
Glama

Minify Code Tool

minify_code
Read-onlyIdempotent

Minify or beautify JS, CSS, HTML, SVG, JSON or XML text. Set type=auto to sniff the language. The code is only parsed and re-printed — never executed and never stored. Rate limit: 30 calls/min per IP.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
codeYesSource code to transform.
modeNoDefault minify.
typeYesSource language, or 'auto' to sniff.
keep_licenseNoPreserve /*! ... */ license comments when minifying.

Schema Changelog

Changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. First observed

TDQS

A4.4/5.0
Behavior5/5

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

Beyond annotations (readOnlyHint, idempotentHint), the description adds valuable behavioral context: the code is never executed or stored, and there is a rate limit of 30 calls/min per IP. This addresses potential safety and usage concerns, exceeding what annotations alone convey.

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 concise and front-loaded with the core purpose, followed by a safety guarantee and rate limit in a second sentence. Every sentence adds value with no redundancy.

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?

Given the tool's simplicity, 100% schema coverage, and no output schema, the description covers the essential aspects: supported formats, operation modes, language detection, and non-execution/storage guarantees. It omits details about the return format, but that is implicitly the transformed code, so the description is sufficiently complete.

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 the schema already explains all parameters. The description adds minimal semantic value beyond highlighting type=auto for sniffing, but does not explain mode defaults or keep_license behavior. This is acceptable but does not elevate above baseline.

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 minifies or beautifies text in specific formats (JS, CSS, HTML, SVG, JSON, XML), using a specific verb and resource. It distinguishes itself from siblings like convert_code by explicitly listing supported languages and operations.

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 provides clear context on when to use the tool by describing the transform operations and the type=auto option for sniffing. It does not explicitly mention alternatives or exclusions, but the context is sufficient to infer typical use cases.

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.

TDQS

A4.2/5.0
Disambiguation5/5

Each tool targets a distinct operation within the color, font, or code utility domains. Descriptions clearly differentiate retrieval, search, and action tools, so an agent can reliably select the right one without ambiguity.

Naming Consistency4/5

All names use snake_case and are readable, but there's a mix of direct verb_noun patterns (check_contrast, extract_colors) and a get_ prefix for retrieval tools (get_font, get_palette). The inconsistency is minor and the pattern remains predictable overall.

Tool Count5/5

15 tools is at the upper end of the well-scoped range, but each tool serves a clear, distinct purpose across three focused domains (fonts, colors, code). No tool feels redundant or unnecessary for the server's mission.

Completeness5/5

The server provides a comprehensive lifecycle for its domains: font search, metadata, file access, CSS generation, and image recognition; color extraction, naming, shading, contrast checking, and palette search; and code detection, conversion, and minification. No obvious gaps exist.