Skip to main content
Glama
Jambozx

OnlineCyberTools MCP (280+ filterable tools)

webdev_html_minifier

Read-onlyIdempotent

Minify HTML by stripping comments, collapsing whitespace, and optionally removing empty elements, redundant quotes, and optional closing tags. Also minifies inline CSS and JS.

Instructions

HTML Minifier. Minify HTML by stripping comments, collapsing whitespace, and optionally removing empty elements, redundant quotes, and optional closing tags, plus minifying inline style CSS and script JS. Pass the markup as the html parameter; every transform is an independent boolean toggle. Use webdev_css_minifier or webdev_js_minifier to compress standalone stylesheets/scripts, web_dev_html_to_markdown to convert HTML to Markdown, and webdev_javascript_beautifier to expand rather than compress. Regex/heuristic minifier, not an HTML parser, so unusual or malformed markup may need review; conditional comments are preserved. Runs locally via a Node bridge: read-only, non-destructive, contacts no external service, rate-limited (60 requests/minute for anonymous callers). Returns the minified HTML plus original/minified byte sizes, byte savings, and compression ratio.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
htmlYesHTML markup to minify. Must be a non-empty string.
removeCommentsNoStrip HTML comments. Conditional comments are always preserved.
removeWhitespaceNoCollapse runs of whitespace, trim, and remove whitespace between tags.
removeEmptyElementsNoRemove elements whose content is empty or whitespace-only.
removeQuotesNoDrop quotes around attribute values that are safe to unquote (alphanumerics, hyphen, underscore).
collapseInlineTagWhitespaceNoCollapse whitespace around inline tags (span, a, strong, b, i, em, small, code, etc.).
preserveLineBreaksNoAccepted for compatibility; reported back in options but does not currently alter output.
removeOptionalTagsNoRemove optional closing tags such as the paragraph close before a block-container end and the list-item close before a list end.
minifyInlineCSSNoMinify CSS inside style attributes (strip comments and collapse whitespace).
minifyInlineJSNoMinify JavaScript inside script blocks (strip comments and collapse whitespace).

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
originalNoThe original HTML, echoed back.
minifiedNoThe minified HTML output.
originalSizeNoOriginal length in characters.
minifiedSizeNoMinified length in characters.
savingsNooriginalSize minus minifiedSize (bytes removed).
compressionRatioNoPercent size reduction, rounded to 2 decimals; 0 when input is empty.
optionsNoThe fully-resolved option set actually applied (every toggle with its effective boolean).
Behavior5/5

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

Annotations already declare readOnlyHint, destructiveHint, and idempotentHint. The description adds valuable context: it runs locally via a Node bridge, is non-destructive, contacts no external service, and is rate-limited. It also clarifies it's a regex/heuristic minifier, not an HTML parser, and that conditional comments are preserved. No contradiction with annotations.

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 yet comprehensive, covering purpose, parameters, usage guidelines, limitations, and performance characteristics in a well-structured paragraph. Every sentence contributes meaningful information without redundancy.

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?

Given the tool's complexity (10 parameters, output schema exists), the description is complete. It explains the main function, all optional transforms, usage with sibling tools, behavioral caveats, and return value components (minified HTML plus sizes/savings/ratio). No gaps remain.

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 parameters are already well-documented. The description adds value by summarizing that 'every transform is an independent boolean toggle', which clarifies the parameter structure. Although it doesn't add details beyond the schema, it provides a useful high-level overview.

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 it minifies HTML by stripping comments, collapsing whitespace, and other transforms. It explicitly distinguishes from sibling tools like webdev_css_minifier and webdev_js_minifier by noting their separate use cases for standalone files. The verb 'minify' and resource 'HTML' are specific and unambiguous.

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?

The description provides explicit guidance on when to use this tool versus alternatives: 'Use webdev_css_minifier or webdev_js_minifier to compress standalone stylesheets/scripts, web_dev_html_to_markdown to convert HTML to Markdown, and webdev_javascript_beautifier to expand rather than compress.' It also warns about unusual markup due to the regex/heuristic approach.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/Jambozx/onlinecybertools-mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server