Skip to main content
Glama

perf_trace

Destructive

Records a DevTools performance trace in Chrome and returns Core Web Vitals conclusions—LCP phases, CLS, INP, long tasks—plus a JSON file for DevTools, not the raw trace.

Instructions

Record a DevTools performance trace and return its conclusions, never the trace: LCP with its phases (TTFB, resource load delay and duration, render delay), FCP, CLS (session windows), INP, the document request, render-blocking resources, long tasks with the function responsible, long animation frames. The raw trace goes to a JSON file (path and size in the result) that DevTools > Performance can load. action record (default) = start, reload unless reload: false, optional action, wait duration_ms, stop. start/stop bracket anything else done meanwhile. Uses chrome.debugger: Chrome shows its debugging bar while tracing; in launch mode nobody sees it. Refuses on a hidden page.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
actionNorecord does start → wait → stop in one callrecord
reloadNoReload the page right after tracing starts (default true for record, false for start)
tab_idNoTarget tab; omitted = last tab navigated in this session, else the active one
save_toNoAbsolute path: write the trace JSON there and return the path instead of the content
duration_msNorecord: how long to trace, max 60000
interactionNoAction run right after recording starts

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv1.28.0

TDQS

A4.2/5.0
Behavior4/5

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

Adds substantive behavior beyond the annotations: the raw trace is written to a JSON file whose path/size come back in the result, tracing uses chrome.debugger so 'Chrome shows its debugging bar while tracing' (invisible in launch mode), and the tool refuses on a hidden page. This side-effect disclosure is genuinely useful and consistent with destructiveHint=true (the reload). It could go further on the reload's page-state impact, but the annotation bar is already met.

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-loads the payoff ('return its conclusions, never the trace') before the details. It is dense and the metric enumeration is a long run-on sentence, but every clause carries needed information given there is no output schema, so little is wasted.

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?

With no output schema and a nested interaction object, the description does the heavy lifting: it lists what is returned, explains the recording lifecycle modes, the raw-trace file artifact, the debugger side effect, and the hidden-page refusal. An agent has everything needed to invoke it correctly.

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 every parameter including the nested interaction object, reload defaults, duration cap, and save_to already carry descriptions. The prose restates the action/reload/duration behavior but adds no syntax or format detail the schema lacks, so the baseline 3 applies.

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 and resource ('Record a DevTools performance trace and return its conclusions') and immediately clarifies the crucial scope point: it returns conclusions, never the raw trace. It enumerates the exact metrics produced (LCP with phases, FCP, CLS, INP, long tasks, long animation frames), so an agent can distinguish this from generic siblings like lighthouse, audit, or track_events.

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 action semantics well: 'record' is the default one-shot (start, reload, wait, stop) while 'start'/'stop' 'bracket anything else done meanwhile', and notes it 'Refuses on a hidden page'. It gives clear conditions for each mode but never names or contrasts against sibling tools such as lighthouse or audit, so the when-to-prefer-this-tool question is left to inference.

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