Skip to main content
Glama

perf_trace

Destructive

Record a DevTools performance trace to get LCP phases, FCP, CLS, INP, long tasks, and render-blocking resources, while saving the raw trace as JSON for DevTools.

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. For smoothness during an interaction use frames, for scores lighthouse.

Input 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.6/5.0
Behavior4/5

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

Adds real side-effect context beyond the annotations: chrome.debugger usage, the visible Chrome debugging bar (and that launch mode hides it), the default page reload, and refusal on a hidden page — which partly accounts for the non-idempotent/destructive hints. It never states why destructiveHint=true or what, if anything, is mutated/discarded, so it falls just short of full disclosure.

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 payload, then side effects, then alternatives — no filler sentences and each block earns its place. It is dense (one long run-on inventory of metrics) but not padded.

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?

For a complex, nested-parameter tool with no output schema, the description carries the return-value burden itself (conclusions, never the trace; JSON file path/size) and covers the debugger requirement, refusal case, and action semantics. An agent has everything needed to call it correctly.

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 already 100%, so the baseline is 3, but the description adds relational meaning the schema does not: "record (default) = start, reload unless reload: false, optional action, wait duration_ms, stop" and the differing reload default between record and start. The interaction and save_to parameters are not elaborated beyond the schema, keeping it from a 5.

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") plus exactly what it returns (LCP with phases, FCP, CLS, INP, long tasks, LoAF, etc.). It also distinguishes itself from siblings by naming frames and lighthouse as alternatives, so an agent can route without opening the schema.

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?

Explicit routing guidance: "For smoothness during an interaction use frames, for scores lighthouse." It also explains when to use each action mode (record = start+reload+wait+stop; start/stop bracket other work) and gives a refusal condition (hidden page), which is exactly the when/when-not/alternative structure.

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