Skip to main content
Glama

crux_lcp_subparts

Decompose Largest Contentful Paint into TTFB, resource load delay, load duration, and render delay to identify the dominant phase and target the right performance fix.

Instructions

Decompose LCP into its four subparts via the CrUX API for actionable performance diagnosis.

Returns p75 values for TTFB, resource load delay, resource load duration, and element render delay, plus the dominant phase (the subpart with the highest p75 ms). Knowing which phase dominates turns "LCP is 4.2s" into a specific fix (server, preload, image size, or render-blocking resources).

form_factor: "PHONE" (default) | "DESKTOP" | "TABLET" | "ALL_FORM_FACTORS" Requires CRUX_API_KEY environment variable. Verdicts: good | needs_improvement | poor | not_enough_data | missing_key | fetch_error. Adapted from claude-seo lcp_subparts.py (agricidaniel, MIT).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
urlYes
form_factorNoPHONE

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv1.2.0

TDQS

A4.4/5.0
Behavior4/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; it discloses the CRUX_API_KEY requirement and enumerates outcome states (good/needs_improvement/poor/not_enough_data/missing_key/fetch_error), which warns the agent about auth and data-availability failures. It does not cover rate limits or latency, so it is strong but not exhaustive.

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?

Front-loaded with purpose and return values, then the parameter and environment details. The trailing attribution line ('Adapted from claude-seo lcp_subparts.py') is minor noise but the body sentences each earn their place.

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?

An output schema exists, yet the description still tells the agent what comes back (four p75 subparts plus dominant phase) and the verdict states, plus the credential requirement. Nothing needed to call it correctly is missing.

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 description coverage is 0%, so the description must compensate. It fully enumerates the form_factor values and default, which the schema does not, though it adds nothing about the url parameter (self-evident, but the schema is bare).

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?

States a specific verb (decompose) and resource (LCP subparts) with the mechanism (CrUX API) and outcome (four named subparts). It is clearly distinguishable from siblings like crux_page_vitals and crux_history.

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?

Explains the diagnostic context clearly — turning an aggregate LCP number into a specific phase to fix. It does not explicitly name alternate tools (crux_page_vitals, pagespeed_audit, preload_audit) or state when to prefer them, so it stops short of full routing guidance.

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