Skip to main content
Glama
1nc0gn30

cwv-speed-engine

by 1nc0gn30

cwv_generate_speculation_rules

Generate W3C Speculation Rules from HTML or URL lists to prerender pages and send 103 Early Hints, cutting navigation latency.

Instructions

Generate W3C Speculation Rules () for instant zero-latency prerendering and 103 Early Hints.

Input Schema

NameRequiredDescriptionDefault
base_urlNoBase URL for resolving internal links (default: https://example.com).https://example.com
html_or_urlsYesHTML content string or comma-separated list of URLs.
aggressivenessNoPrerender/prefetch eagerness aggressiveness (default: balanced).balanced

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv2.0.0

TDQS

C2.9/5.0
Behavior2/5

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

With no annotations, the description carries the full behavioral burden. It describes the output artifact format but omits whether the tool also emits 103 Early Hints headers, whether it makes network calls, whether it is a pure transformation, and any input or scope limits — a notable gap for a generator tool.

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 with no filler, though the trailing 'and 103 Early Hints' clause stacks a second, ambiguous capability onto an already dense statement rather than clarifying it.

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?

For a three-parameter tool with full schema coverage and no output schema, the description is minimally adequate. It leaves unresolved whether the tool emits two distinct artifacts (Speculation Rules and Early Hints) and provides no usage or safety context, so an agent has gaps before invoking it.

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 the three parameters (base_url, html_or_urls, aggressiveness with its enum) are already fully documented in the schema. The description adds no parameter-level meaning beyond that, making the baseline 3 appropriate.

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?

States a specific verb (Generate) and resource (W3C Speculation Rules), and even names the exact output artifact, the <script type='speculationrules'> tag. It is clear what the tool produces, though it does nothing to distinguish itself from siblings like cwv_generate_cache_config or cwv_generate_pwa that share the same 'generate' verb.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The phrase 'for instant zero-latency prerendering' implies a goal but gives no when-to-use guidance, no prerequisites, and no named alternative among the sibling generators. An agent must infer the appropriate context entirely.

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