Skip to main content
Glama

Minify JavaScript, CSS, or HTML

minify_code
Read-onlyIdempotent

Minify source code with Terser (JS), csso (CSS), or a structural HTML pass and report before/after byte counts.

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": {
      "language": "<language>",
      "code": "<code>"
    },
    "name": "minify_code"
  }
}

Input Schema

NameRequiredDescriptionDefault
codeYes
cssLevelNo
jsMangleNo
languageYes
jsCompressNo
htmlAggressiveNo

Output Schema

NameRequiredDescriptionDefault
codeYes
savedPctYes
afterBytesYes
savedBytesYes
beforeBytesYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • addedInput schema / additionalProperties
      Added value: +false
  2. First observed

TDQS

B3.3/5.0
Behavior3/5

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

Annotations already cover the safety profile (readOnlyHint=true, idempotentHint=true, openWorldHint=false), and the description adds that it reports before/after byte counts, which is genuinely useful behavioral context. It stops short of disclosing how options like mangling or aggressive HTML mode affect output size or fidelity, so the add-over-annotations value is moderate.

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?

A single front-loaded sentence with zero filler: verb, resource, engine-per-language, and output are all stated in one pass. Nothing is redundant with the title or restated later.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

The output schema and annotations cover return values and safety, so the description need not explain those. However, for a six-parameter tool with a 0% schema coverage rate, the definition leaves the majority of the option surface undefined, which is a meaningful gap in an otherwise accurate statement.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, so the description must carry parameter meaning, and it does not explain any of the six parameters. The four optional flags (jsMangle, jsCompress, cssLevel, htmlAggressive) and their defaults are undocumented in both schema and description, leaving the agent to guess their effect and interaction.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description names a specific verb and resource ('Minify source code') and enumerates the concrete engines used per language (Terser for JS, csso for CSS, a structural pass for HTML), so the agent knows exactly what operation and output to expect. It does not differentiate itself from sibling tools, though no sibling in the provided list performs minification.

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?

Usage is only implied: the 'language' enum and the per-language engine list suggest the tool's role, but the description never states when to use it versus alternatives (e.g. compress_image or convert_data_format) or any prerequisites. No when-not guidance or exclusions are given.

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.