Skip to main content
Glama

Performance trace

perf_trace
Read-only

Records a DevTools-style performance trace, saves the JSON, and analyzes long tasks, blocking time, LCP, CLS, and slow scripts to diagnose page performance.

Instructions

Records a performance trace like the DevTools Performance panel (optionally reloading the page first), saves the .json trace (open it in DevTools > Performance) and returns an analysis: long tasks, total blocking time, main-thread breakdown, render-blocking requests, LCP, CLS and the slowest scripts. Use action "start"/"stop" for manual recording or "run" to record for durationMs.

Input Schema

NameRequiredDescriptionDefault
tabIdNoTab to act on. Defaults to the session target tab (see tab_select).
actionNoRecording mode (default run).
reloadNoReload the page when recording starts (default true for run).
savePathNoAbsolute file path to save to. Defaults to a file in the kyte-webmcp output folder.
cpuProfileNoInclude JavaScript CPU samples for the flame chart (default true).
durationMsNoHow long to record for action run (default 5000, or until load + 3 s when reloading).

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

B3.3/5.0
Behavior2/5

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

The description is unusually rich about outputs (long tasks, TBT, main-thread breakdown, render-blocking requests, LCP, CLS, slowest scripts) and flags that recording can reload the page, with reload defaulting to true for 'run'. That default page reload, plus writing a .json file to disk, sits in tension with readOnlyHint=true, which tells an agent the call has no side effects; an agent trusting the annotation could reload a page with unsaved form state.

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?

Two dense sentences, front-loaded with what the tool does and then what it returns; nothing is padding. The parenthetical '(open it in DevTools > Performance)' is genuinely useful, though the second sentence could have been folded in more tightly.

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

Completeness4/5

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

With no output schema, the description carries the burden of describing return values and does so thoroughly, and it documents the reload/duration interaction that the schema only hints at. What is missing is roughly how long a manual start/stop session can run and any permission or session-target constraints.

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 already documented, which sets the baseline at 3. The description adds a little beyond the schema by restating the run/start/stop semantics and the duration behavior ('or until load + 3 s when reloading'), but it does not explain savePath, cpuProfile or tabId defaults any further.

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 and resource ('Records a performance trace like the DevTools Performance panel'), and spells out what it produces: a saved .json trace plus an analysis. It is clear what the tool does, but it never names the sibling that overlaps most (perf_metrics) or explains the boundary, so differentiation is implicit rather than explicit.

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?

It explains the internal modes well ('start'/'stop' for manual recording, 'run' to record for durationMs), which is genuine usage guidance. However, it gives no guidance on when to reach for perf_trace instead of perf_metrics, coverage, network_har or console_logs, all of which sit in the same diagnostic space, so the alternative-selection 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.