Skip to main content
Glama
1nc0gn30

cwv-speed-engine

by 1nc0gn30

cwv_optimize_html

Optimize HTML to boost Core Web Vitals by automating image dimensions, font preconnects, script deferral, and lazy loading.

Instructions

Transform and optimize HTML code with automated image dimensions, font preconnects, script deferral, and lazy loading to boost CWV scores.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
htmlNoRaw HTML string to optimize.
file_pathNoPath to local HTML file to read and optimize (used if html string is omitted).
defer_scriptsNoWhether to add 'defer' to render-blocking head scripts.
lazy_load_imagesNoWhether to add loading='lazy' and decoding='async' to images.
preconnect_fontsNoWhether to inject font preconnect headers.
inline_critical_cssNoWhether to inline critical CSS.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

B3.3/5.0
Behavior2/5

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

No annotations are provided, so the description carries the full burden of behavioral disclosure. It states the transformations applied but does not reveal whether the tool returns the optimized HTML string, writes back to file_path (a destructive side effect), or leaves the input untouched. For a transformation tool with no output schema, the missing return-value and file-mutation behavior is a significant gap.

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?

A single, front-loaded sentence that states the verb, resource, and scope of work without filler. It efficiently bundles the four optimization behaviors and the motivating goal. It loses a point only because the return-value and file-handling behavior are absent, which arguably warrants a bit more space.

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

Completeness2/5

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

For a transformation tool with 6 parameters, no output schema, and no annotations, the description omits essential information: what the tool returns, whether it reads from or writes to file_path, and any side effects of the transformation. An agent cannot fully predict the tool's behavior from this definition alone.

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 all six parameters are documented in the schema; the baseline is 3. The description adds thematic value by tying defer_scripts, lazy_load_images, and preconnect_fonts to the stated optimization goals and CWV context, but it does not add syntax, format, or inter-parameter dependency details beyond what the schema already provides.

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 states a specific verb ('transform and optimize'), a clear resource ('HTML code'), and enumerates the concrete transformations (image dimensions, font preconnects, script deferral, lazy loading) plus the goal (boost CWV scores). This clearly differentiates it from its siblings, which audit sites, generate cache configs/PWAs/OG cards, or diff performance — none of which transform HTML.

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?

The purpose implies usage (optimize HTML to improve Core Web Vitals), and the sibling names are distinct enough that an agent could infer when to pick this tool. However, there is no explicit when/when-not guidance — nothing about preferring the html string over file_path, nor whether to call this before or after an audit like cwv_audit_site, nor when to disable individual optimizations.

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