perfetto-mcp-rs
perfetto-mcp-rs is an MCP server that lets LLMs analyze Perfetto trace files (Chrome, Android, Linux) using PerfettoSQL for deep performance profiling.
Load trace files (
load_trace): Open a.perfetto-traceor.pftracefile — must be called first before most other tools.Discover tables (
list_tables): List all tables and views in the loaded trace, with optional GLOB filtering (e.g.chrome_*).Inspect schemas (
list_table_structure): View column names, types, nullability, and primary-key flags for any table or view.Run custom SQL (
execute_sql): Execute arbitrary PerfettoSQL statements (includingINCLUDE PERFETTO MODULE) against the trace, returning up to 5000 rows.List processes (
list_processes): Enumerate all processes with their upid, pid, name, and start/end timestamps.List threads (
list_threads_in_process): Drill into threads belonging to a specific process by name or upid.Chrome scroll jank (
chrome_scroll_jank_summary): Surface the worst janky scroll frames with cause, sub-cause, and delay information.Chrome page loads (
chrome_page_load_summary): Summarize navigations with FCP, LCP, DCL, and load timings in milliseconds.Chrome main-thread hotspots (
chrome_main_thread_hotspots): Identify top main-thread tasks by wall duration and CPU usage, filterable by process/pid/upid and duration threshold.Chrome startup (
chrome_startup_summary): Measure browser startup events and time-to-first-visible-content across different launch causes.Chrome interactions (
chrome_web_content_interactions): Rank web content interactions (clicks, taps, INP) by duration to diagnose user-felt latency.Explore stdlib modules (
list_stdlib_modules): Browse available PerfettoSQL stdlib modules (Chrome, Android, generic) with descriptions and example queries — no trace required.
Provides analysis capabilities for Android traces using PerfettoSQL stdlib modules, enabling performance profiling and system analysis on Android platform traces.
perfetto-mcp-rs
An MCP server that lets LLMs analyze
Perfetto traces. Point Claude Code (or any MCP client) at
a trace file (.pftrace / .perfetto-trace / .bin / … — content-sniffed) and
ask in plain language. The server runs PerfettoSQL under the hood, backed by
trace_processor_shell — downloaded automatically on first run, no manual
Perfetto install required.
Dedicated tools ship curated SQL; for custom analysis the agent writes PerfettoSQL — steered toward the right stdlib modules.
Quick start
You drive perfetto-mcp-rs through an MCP client (Claude Code, Claude Desktop, Codex, Cursor, …) — install one first if you don't have it.
1. Install — downloads the prebuilt binary and, if Claude Code and/or Codex are present, registers the MCP server automatically:
# Linux / macOS / Windows (Git Bash, MSYS2, Cygwin)
curl -fsSL https://raw.githubusercontent.com/tooluse-labs/perfetto-mcp-rs/main/install.sh | sh# Windows (PowerShell)
irm https://raw.githubusercontent.com/tooluse-labs/perfetto-mcp-rs/main/install.ps1 | iexRestart Claude Code (or start a new Codex session) to pick it up. Homebrew, Cargo, project scope, direct-binary download, and manual registration are under Install options.
2. Ask in plain language:
Load
~/traces/scroll_jank.pftraceand tell me the top scroll-jank causes.
Swap in any Perfetto trace you have — captured from the Perfetto UI,
chrome://tracing, or record_android_trace.
The agent calls load_trace, sees it's a Chrome trace, and reaches for the
dedicated chrome_scroll_jank_summary tool — no SQL to hand-write. When a
question falls outside the dedicated tools, it drops down to execute_sql with
raw PerfettoSQL on the same trace.
Works best with agentic clients (Claude Code, Codex, Claude Desktop, Cursor) that chain multi-turn tool calls and follow the server's error-message nudges. Non-agentic clients see the same tools and error nudges, but won't chain the guided flow automatically.
Related MCP server: mcp-server-logs-sieve
Tools
For one trace, other tools act on the most recently loaded trace by default. For
multiple traces, call load_trace with paths, keep the returned trace_id for
each file, and pass the intended id to every trace-bound tool call.
MCP tool annotations are client-facing intent and safety hints, not server-side authorization or execution boundaries.
Essential
Tool | Purpose |
| Open one trace with |
| Run a PerfettoSQL query (max 5000 returned rows). Prefer the dedicated |
Exploration
Tool | Purpose |
| List tables/views in the loaded trace, optional GLOB filter |
| Show column names and types for a table |
| List processes (pid, name, start/end timestamps) |
| List threads under a process name (up to 2000) |
| Summarize child slices under a long slice id without hand-writing recursive CTEs |
| List PerfettoSQL stdlib modules, optional |
Chrome traces — dedicated tools so the agent doesn't hand-roll SQL. Each flags row/string truncation in its metadata.
Tool | Purpose |
| Worst janky frames with cause, sub-cause, delay_since_last_frame |
| Page loads: URL, raw boundary timestamps, FCP, LCP, DCL, load timings (ms) |
| Compact URL-level resource/request summary for page-load windows, ranked by max overlap with normalized origin, navigation/renderer relatedness, and attribution-scope evidence |
| One URL's lifecycle/request spans joined with background parse, script evaluation, and style/layout signals, plus an evidence boundary for DNS/TLS/TTFB/cache/download hypotheses |
| URL-bearing resource/request slices on thread, process, and async tracks ranked by page-load/window overlap, with process/thread identity where available |
| Renderer main-thread script execution grouped by URL/slice/process within a page-load/window, with style/layout descendant signals |
| Top main-thread tasks by duration with ts, upid/pid, cpu_pct, and optional page-load/time-window filters |
| Browser startup events and time-to-first-visible-content |
| Web content interactions (clicks, taps, INP) ranked by duration |
Resources
Resource | Purpose |
| On-demand PerfettoSQL stdlib quick reference for Chrome, Android, and generic traces |
Analyzing a trace
The right path depends on the trace type:
Chrome traces —
load_trace→ dedicatedchrome_*tools →execute_sqlfor deeper cuts on the returned rows. For slow FCP/load, checkchrome_page_load_resource_summaryfirst, thenchrome_page_load_resource_pipelinefor one slow URL orchrome_page_load_resource_hotspotsfor slice drilldown, before interpreting main-threadResourceLoad*slices as full request time. The summary'sresource_timing_evidencesays whether DNS/TLS/TTFB/download/cache phase hints exist; keep conclusions at URL lifecycle-span level when phase breakdown is absent. Usechrome_page_load_script_hotspotsfor post-resource JS and style/layout work, andslice_descendants_breakdownon a long taskidfor its child-slice breakdown.Other traces (Android, generic) —
load_trace→list_stdlib_modules(or readresource://perfetto-mcp/stdlib-quickref) to check for a ready-made module first (Android, generic modules likeslices.with_context), then run it viaexecute_sql+INCLUDE PERFETTO MODULE. No module fits? Fall back tolist_tables/list_table_structurefor schema discovery, thenexecute_sql.
Analyzing multiple traces
Load comparison targets together with load_trace(paths=[...]). The response
returns one stable trace_id per file. Run the same trace-bound tool for each id
(concurrently when the MCP client supports parallel tool calls), then compare
the returned evidence. Calls without trace_id remain backward compatible and
use the most recently loaded trace. If a loaded file changes on disk, its old id
is rejected with an explicit instruction to reload it.
Privacy — tool results enter the LLM context, and real traces can hold URLs,
headers, cookies, and local paths. execute_sql and the dedicated Chrome tools
mask sensitive user and credential-like values by default while keeping the
diagnostic structure visible. For raw forensic work, start the server with
PERFETTO_MCP_REDACT_STRINGS_DEFAULT=false; load_trace reports the active
policy in its summary.
Precision — dedicated Chrome tools preserve full string cells by default. Use
max_string_len only when you explicitly want to trade detail for a smaller
response.
Under the hood: dedicated tool vs. raw SQL
The scroll-jank question above resolves to a single chrome_scroll_jank_summary
call — no SQL to write. When you need a cut the dedicated tools don't expose, the
agent drops to execute_sql with PerfettoSQL; the same breakdown by hand:
INCLUDE PERFETTO MODULE chrome.scroll_jank.scroll_jank_v3;
SELECT cause_of_jank, COUNT(*) AS n
FROM chrome_janky_frames
GROUP BY cause_of_jank
ORDER BY n DESC;Configuration
Server settings are read at startup; when both a CLI flag and environment variable exist, the CLI flag wins.
Setting (flag / env) | Default | Effect |
| — | Path to an existing |
|
| Max time to wait for a spawned |
|
| HTTP timeout for |
|
| Maximum idle |
|
| Maximum active |
| off | Emit tracing span-close timings for performance hotspot diagnosis ( |
| LUCI bucket | Override the |
|
| Mask sensitive URL/header/cookie/path strings in tool output; set |
| off | Use full-file SHA-256 for trace cache identity instead of head/middle/tail sampling ( |
| — |
|
Install options
Package managers — if you'd rather not run the install script:
# macOS / Linux via Homebrew
brew tap tooluse-labs/tap
brew install perfetto-mcp-rs
# brew prints caveats; run the printed line to register with Claude Code / Codex:
perfetto-mcp-rs install --binary-path "$(brew --prefix)/bin/perfetto-mcp-rs"
# Rust developers via cargo
cargo install --locked perfetto-mcp-rs
perfetto-mcp-rs install --binary-path "$(which perfetto-mcp-rs)"If Qoder is detected during a script install, the installer prints a paste-ready JSON snippet (Qoder has no programmatic MCP-registration API yet — open Qoder Settings → MCP → + Add and paste).
Claude scope — registration defaults to --scope user (available from any
directory). For a project-local install, set SCOPE=local (or project) and run
the script from that project's directory:
SCOPE=local bash -c 'curl -fsSL https://raw.githubusercontent.com/tooluse-labs/perfetto-mcp-rs/main/install.sh | sh'PowerShell equivalent: $env:SCOPE = 'local'; irm ... | iex. Codex has no scope
concept and ignores this variable.
Direct binary — supported platforms: linux amd64/arm64, macOS amd64/arm64,
Windows amd64. Grab the binary from the
releases page. Release
assets are named perfetto-mcp-rs-<platform> (e.g. perfetto-mcp-rs-linux-amd64);
rename or address the downloaded file explicitly when invoking install, and on
Unix mark it executable first (chmod +x) — the subcommand refuses
non-executable paths to avoid writing a broken MCP entry. Example:
# Linux amd64 example — adjust the asset name for your platform.
curl -fsSL -o perfetto-mcp-rs \
https://github.com/tooluse-labs/perfetto-mcp-rs/releases/latest/download/perfetto-mcp-rs-linux-amd64
chmod +x perfetto-mcp-rs
./perfetto-mcp-rs install --scope user --binary-path "$PWD/perfetto-mcp-rs"Manual MCP client configuration — if the installer's auto-registration doesn't apply to your client.
Codex:
codex mcp add perfetto-rs -- /absolute/path/to/perfetto-mcp-rsJSON-based clients (e.g. Claude Code, Claude Desktop, Cursor):
{
"mcpServers": {
"perfetto-rs": {
"command": "/absolute/path/to/perfetto-mcp-rs"
}
}
}Upgrade & uninstall
Upgrade — run the update subcommand:
perfetto-mcp-rs updateIt pulls the latest release, safely overwrites the existing binary (with Windows file-lock retry), and re-registers the MCP server with Claude Code / Codex idempotently. No auto-update daemon — upgrades are explicit.
Pin to a specific version with the --version flag:
perfetto-mcp-rs update --version v0.7.0For Claude local/project registrations, re-run from the original project directory and pass the same scope:
perfetto-mcp-rs update --scope localThe raw installer one-liners still work if you prefer to drive upgrades manually or need installer-specific environment overrides.
The VERSION env var also works, but must come immediately before sh
(POSIX VAR=value cmd only scopes to the next command — VERSION=v0.7.0 curl ... | sh puts VERSION on curl, not on the piped sh):
curl -fsSL https://raw.githubusercontent.com/tooluse-labs/perfetto-mcp-rs/main/install.sh | VERSION=v0.7.0 shPowerShell — set $env:VERSION in the same line, since iex runs in the current
session:
$env:VERSION = 'v0.7.0'; irm https://raw.githubusercontent.com/tooluse-labs/perfetto-mcp-rs/main/install.ps1 | iexCheck for updates:
perfetto-mcp-rs check-updateExits 0 if up to date (or ahead of releases — local dev build), 2 if a newer
release exists, 1 on network or parse error. Useful for shell-prompt integrations
and CI pre-checks. If it reports a newer release, run perfetto-mcp-rs update.
Uninstall — symmetric one-liner per platform. Deregisters from Claude Code and
Codex, removes the binary, and deletes the cached trace_processor_shell.
Idempotent — safe to run if any step was already done by hand.
# Linux / macOS / Windows (Git Bash, MSYS2, Cygwin)
curl -fsSL https://raw.githubusercontent.com/tooluse-labs/perfetto-mcp-rs/main/uninstall.sh | sh# Windows (PowerShell) — close Claude Code, Codex, or anything else using the .exe first
irm https://raw.githubusercontent.com/tooluse-labs/perfetto-mcp-rs/main/uninstall.ps1 | iexScoped installs (local / project) — claude stores local/project entries
keyed by project directory, so uninstall must use the same SCOPE AND run from
that directory. Omitting this leaves the scoped Claude entry behind while the
wrapper still removes the binary and cache:
# Ran `SCOPE=local bash install.sh` in ~/work/foo earlier? Then:
cd ~/work/foo
SCOPE=local bash -c 'curl -fsSL https://raw.githubusercontent.com/tooluse-labs/perfetto-mcp-rs/main/uninstall.sh | sh'PowerShell equivalent: cd <original-project-dir>; $env:SCOPE = 'local'; irm ... | iex.
$INSTALL_DIR (default ~/.local/bin) is not removed from your PATH:
Linux / macOS — the installer only prints a
PATHhint; if you added it to your shell rc, remove that line manually.Windows — the installer writes
$INSTALL_DIRinto your user PATH (HKCU\Environment); remove it via System Properties → Environment Variables if you want it gone.
Other tools may still depend on this directory, which is why uninstall leaves it in place.
Build from source
Requires a Rust toolchain and protoc (Protocol Buffers compiler):
# Ubuntu/Debian
sudo apt install -y protobuf-compiler
# macOS
brew install protobuf
# Windows
choco install protocThen:
git clone https://github.com/tooluse-labs/perfetto-mcp-rs
cd perfetto-mcp-rs
cargo build --release
# Binary at target/release/perfetto-mcp-rsDevelopment:
cargo test # unit tests
cargo clippy # lint
cargo fmt # formatLicense
Dual-licensed under either of Apache License, Version 2.0 or MIT license at your option. Contributions are accepted under the same terms.
Available Tools
17 toolschrome_main_thread_hotspotsARead-onlyIdempotent
Top Chrome main-thread tasks by wall duration: id, ts, name, task_type, thread_name, process_name, upid, pid, nullable machine_id, dur_ms, overlap_dur_ms, full_task_cpu_pct/full_task_thread_dur_ms, overlap_cpu_pct/overlap_thread_dur_ms; legacy cpu_pct/thread_dur_ms are full-task. Uses chrome.tasks, thread.is_main_thread = 1, and Chrome's Cr*Main fallback. Pass a returned id to slice_descendants_breakdown for child-slice breakdowns.
Use when: investigating responsiveness, scroll/load stalls, CPU vs wall time, or one renderer.
Don't use for: non-Chrome traces (will error). For background (non-main) thread tasks, drop to execute_sql against chrome.tasks directly.
Parameters (all optional):
process_name/pid/machine_id/upid: scope to one process/type. Preferupid; addmachine_idto disambiguate multi-machinepids. All filters AND.page_load_id/navigation_id/phase: scope to a page-load window. IDs matchchrome_page_loads.idand.navigation_idrespectively and are mutually exclusive.phase:navigation_to_fcp,navigation_to_load,dcl_to_fcp,fcp_to_load. If an id is set withoutphase, defaults tonavigation_to_fcp; phase-only uses the latest page load.start_ts_ns/end_ts_ns: raw trace timestamp bounds in nanoseconds (end_ts_nsexclusive); aliasesstart_ts/end_tsare accepted; intersect page-load windows.overlap_dur_msis clipped to that window.min_dur_ms: minimum full-task duration, or clipped overlap duration when a window is set. Defaults to 16 ms. Pass 0 for all positive-overlap tasks.limit: max rows (default 100, capped at 5000). Must be > 0 if set.max_string_len: optional cap for returned string cells. Unset preserves full strings for precision. Must be > 0 if set.
Output: metadata-first JSON preserving columns / rows; truncated=true means an extra-row probe found more rows; string_truncated=true means cell text was shortened.
Empty result: no detected main-thread tasks exceeded min_dur_ms at the selected process/window threshold, or the trace uses non-standard main-thread names outside the Cr*Main fallback.
Inputs: pid, upid, limit, phase, +9 more.
chrome_page_load_resource_hotspotsARead-onlyIdempotent
Rank URL-bearing Chrome resource/request slices in a page-load/raw window. Returns timing, overlap, process/thread/machine_id, URL. Use after chrome_page_load_resource_summary to drill into slow URL slices. Filters: page_load/window, min_dur_ms default 50, limit, max_string_len. slice_duration_status='incomplete_duration' means dur=-1; overlap is measured to window end or trace_end().
Inputs: limit, phase, trace_id, end_ts_ns, +5 more.
chrome_page_load_resource_pipelineARead-onlyIdempotent
Drill into one Chrome page-load resource URL and join lifecycle/request spans with script/style/layout signals. Use after chrome_page_load_resource_summary with example_slice_id or url_substring. Returns timing facts, match evidence, resource ends, primary/detail slice evidence (detail is not a root-cause claim), URL/ancestor-correlated resource result source/hit, machine-id sets, incomplete count, and evidence_boundary. Parameters: URL seed required; optional window filters, url_grouping, limit default 30, max_string_len.
Inputs: limit, phase, trace_id, end_ts_ns, +7 more.
chrome_page_load_resource_summaryARead-onlyIdempotent
URL-level Chrome resource/request summary for a page-load/raw window. Returns URL key, process/machine/priority sets, span, max/summed overlap, primary/detail slice evidence (detail is not a root-cause claim), navigation/renderer relation including target_renderer_source, example_slice_id, incomplete_duration_slice_count. Use before chrome_page_load_resource_hotspots; rank by max overlap.
Inputs: limit, phase, trace_id, end_ts_ns, +6 more.
chrome_page_load_script_hotspotsARead-onlyIdempotent
Rank renderer main-thread script groups in a Chrome page-load/raw window: URL/name/process/thread/machine_id, wall/CPU totals, style/layout ms, example_slice_id. Read-only.
Use when: slow FCP/load needs post-resource JS attribution; expand example_slice_id with slice_descendants_breakdown.
Parameters: optional process filters (process_name/pid/machine_id/upid), page-load/window filters shared with chrome_main_thread_hotspots, min_total_ms (default 20), limit, max_string_len. Empty result: no matching script groups.
Inputs: pid, upid, limit, phase, +9 more.
chrome_page_load_summaryARead-onlyIdempotent
Summarize each page navigation in a Chrome trace: navigation id, URL, raw boundary timestamps, FCP / LCP / DCL / load timings in ms. Read-only.
Use when: comparing page-load timings across navigations, finding slow loads, baselining web-vitals before/after a change. Prefer over hand-joining chrome.page_loads — schema is already correct.
Don't use for: non-Chrome traces (will error). For sub-event timings inside one navigation, drop to execute_sql against the chrome.page_loads module.
Parameters: optional limit (default 100, capped at 5000) and max_string_len. Operates on the loaded trace.
Output: metadata-first JSON; row_count exact; truncated=true means more rows exist; string_truncated=true means shortened text.
Empty result: no navigations occurred during capture (e.g. trace started after the page was already loaded).
Inputs: limit, trace_id, max_string_len.
chrome_scroll_jank_summaryARead-onlyIdempotent
Summarize the worst scroll jank frames in a Chrome trace: cause_of_jank, sub_cause_of_jank, delay_since_last_frame, event_latency_id, scroll_id, vsync_interval. One row per janky frame, sorted by delay_since_last_frame DESC. Read-only.
Use when: investigating jank reports, finding scroll regressions, ranking jank causes. Prefer over hand-rolling SQL on chrome.scroll_jank.scroll_jank_v3 — same data, less code.
Don't use for: non-Chrome traces (will error). For custom filters, use execute_sql against the same view.
Parameters: optional limit (default 100, capped at 5000) and max_string_len. Operates on the loaded trace.
Output: metadata-first JSON; row_count exact; truncated=true means more rows exist; string_truncated=true means shortened text.
Empty result: no janky frames detected (clean trace) or no scrolls occurred during capture.
Inputs: limit, trace_id, max_string_len.
chrome_startup_summaryARead-onlyIdempotent
Summarize Chrome browser startup events: id, name, launch_cause, startup_duration_ms (first_visible_content_ts - startup_begin_ts), browser_upid. Read-only.
Use when: measuring time-to-first-visible-content for cold starts, comparing launch causes (NEW_WINDOW vs CMD_LINE vs RESTORE_SESSION), regressing startup performance.
Don't use for: non-Chrome traces (will error). Browser-process work during steady state is covered by chrome_main_thread_hotspots.
Parameters: optional limit (default 100, capped at 5000) and max_string_len. Operates on the loaded trace.
Output: metadata-first JSON; row_count exact; truncated=true means more rows exist; string_truncated=true means shortened text.
Empty result: trace started after the browser was already running (most cases — startup is captured only when tracing began before launch).
Inputs: limit, trace_id, max_string_len.
chrome_web_content_interactionsARead-onlyIdempotent
Rank Chrome web content interactions by total_duration_ms: id, ts, total_duration_ms, longest_event_dur_ms, interaction_type, renderer_upid. Read-only.
Use when: INP analysis, reproducing user-felt latency, finding slow click/tap/keyboard handlers.
Don't use for: non-Chrome traces (will error). For interactions filtered by interaction_type, drop to execute_sql against chrome.web_content_interactions.
Parameters: optional limit (default 100, capped at 5000) and max_string_len. Operates on the loaded trace.
Output: metadata-first JSON; row_count exact; truncated=true means more rows exist; string_truncated=true means shortened text.
Empty result: no interactions captured (trace started before user input or interaction tracking was disabled in tracing config).
Inputs: limit, trace_id, max_string_len.
execute_sqlARead-onlyIdempotent
Run a PerfettoSQL query against the loaded trace and return rows as columnar JSON. Read-only against trace data; SQLite operates in-memory per session. Aggregates are strongly preferred over raw row data; results are capped at 5000 rows.
Use when: composing analyses not covered by the dedicated tools — custom aggregations, joins across stdlib modules, or queries against base tables (slice, thread, process, sched).
Don't use for: questions the dedicated chrome_* tools answer — they return the same data with the JOIN shape already correct. Don't hand-roll slice scans with LIKE '%x%' patterns when a stdlib module covers the data; INCLUDE PERFETTO MODULE chrome.tasks is faster and the joins are pre-baked.
Parameters: sql is a single PerfettoSQL statement (the INCLUDE PERFETTO MODULE foo; and SELECT ... can be in the same call). Optional output shaping (head/limit, columns_only, summary, include_row_count, max_string_len) only changes what this tool returns; it does not rewrite the SQL. Blob cells render as blob:hex:<hex>. String results may be redacted by the server privacy policy before they are returned, preserving diagnostic structure while masking sensitive URL/header/cookie/path values. Requires load_trace to have run first.
Empty rows means the query matched nothing — distinct from a SQL error, which is returned as an error string with a hint pointing at the most likely cause (missing module, missing column, missing table).
Reference docs (fetch when you need exact column names or function signatures): https://perfetto.dev/docs/analysis/stdlib-docs (24 stdlib packages — chrome / android / sched / slices / linux / wattson / v8 / ...; use per-package anchors like #package-chrome), https://perfetto.dev/docs/analysis/perfetto-sql-syntax (syntax).
Inputs: sql (required), head, limit, summary, +4 more.
list_processesARead-onlyIdempotent
List every process captured in the trace: upid (trace-internal id), pid, machine_id, name, start_ts, end_ts. Read-only.
Use when: entry point for Android and Linux trace analysis, or picking the right pid/upid to feed into list_threads_in_process or chrome_main_thread_hotspots.
Don't use for: Chrome traces — the dedicated chrome_* tools answer most common questions without process-level navigation.
Parameters: none — operates on the loaded trace.
Empty result: rare; would mean the trace captured no process metadata at all.
Errors when: no trace is loaded — call load_trace first.
Inputs: trace_id.
list_stdlib_modulesARead-onlyIdempotent
List curated PerfettoSQL stdlib modules as JSON entries with domain, module, views, description, and usage. Use when choosing an INCLUDE PERFETTO MODULE ... target; no trace has to be loaded.
Optional filters: domain (chrome, android, generic), query (case-insensitive search over module/view/description), and limit. For longer guidance, read resource://perfetto-mcp/stdlib-quickref.
Inputs: limit, query, domain.
list_tablesARead-onlyIdempotent
List tables and views in the loaded trace. Read-only.
Use when: exploring an unfamiliar trace or verifying a table exists before writing SQL. Underlying SQL engine is SQLite, so the catalog tables common in other SQL engines aren't present — this MCP tool is the schema introspection path.
Don't use for: queries against known stdlib modules — go straight to execute_sql with INCLUDE PERFETTO MODULE. Don't reference this tool name inside SQL; it's a separate MCP tool, not a SQL function — call it via the tool API.
Parameters: optional pattern — SQLite GLOB filter (e.g. chrome_* for chrome stdlib views, slice* for the slice table family). Without it, internal stdlib tables (_*) are hidden.
Empty result: no tables matched. For stdlib views, run execute_sql with INCLUDE PERFETTO MODULE ... first; otherwise retry an explicit pattern for internal tables.
Errors when: no trace is loaded — call load_trace first.
Inputs: pattern, trace_id.
list_table_structureARead-onlyIdempotent
Show the columns of a table or view: name, type, nullability, primary_key flag.
Use when: writing or debugging a query — call this immediately after a no such column error to inspect the actual schema rather than guessing. Both stdlib views and base tables have fixed schemas; don't infer columns by analogy across them.
Don't use for: this is a separate MCP tool, not a SQL function — don't write SELECT * FROM list_table_structure inside execute_sql.
Parameters: table_name (string) — the exact table or view name as it appears in list_tables output. Case-sensitive; does not accept GLOB patterns or partial matches. Also accepts the alias name (v0.11.3+).
Errors when: the table doesn't exist or has no columns. Call list_tables first; stdlib views may need an INCLUDE first.
Inputs: table_name (required), trace_id.
list_threads_in_processARead-onlyIdempotent
List threads in one process or same-named process set: tid, thread_name, pid, upid, machine_id. Limit 2000, cap 5000.
Use when: drilling into a process from list_processes.
Don't use for: ALL trace threads — use execute_sql on thread.
Parameters: pass either upid (trace-internal id, precise — prefer when multiple processes share a name like 'Renderer') or process_name (exact match). upid wins when both are set. Optional limit and offset page large result sets; both accept numbers or numeric strings.
Output: exact row_count, returned_rows, truncated/has_more; rows are ordered by pid/tid. process_counts reports per-upid counts for same-name fan-out.
Empty result: returned as an error pointing at list_processes for available candidates.
When truncated=true, increase offset or drill down with upid.
Inputs: upid, limit, offset, trace_id, +1 more.
load_traceAIdempotent
Load one or more local Perfetto trace files and return routing summaries plus trace_id handles. Other tools use the active trace by default; pass trace_id to analyze a specific loaded trace after loading more.
Use when: starting any analysis session — call this first.
Don't use for: live capture or streaming URLs; paths must be complete local trace files.
Parameters: pass path for one trace or paths for a batch. Calling again makes the last loaded path the active default; cached trace processors make repeat loads cheap unless the file fingerprint changed.
Errors when: the file doesn't exist, isn't a valid Perfetto trace, trace_processor fails to parse it, or the binary cannot be downloaded.
Inputs: path, paths.
slice_descendants_breakdownARead-onlyIdempotent
Recursive child-slice expansion under known slice.id roots, aggregated as a bounded breakdown per (depth, name) group. Use to drill into a long task — after chrome_main_thread_hotspots or execute_sql returns a slice id — without hand-writing WITH RECURSIVE CTEs over slice.parent_id. Required: slice_ids. Optional bounds: min_dur_ms, max_depth, limit, include_args, max_string_len. The response echoes summary_scope, applied_filters, and missing_root_ids (missing root slice ids). Returned columns: root_id, depth, name, slice_count, inclusive_total_ms (do not sum across depths), self_ms (direct-child time subtracted, clamped at zero), max_ms, first_ts_ns (raw nanoseconds, not ms), example_slice_id (longest-duration descendant per group), and optionally example_args. incomplete_descendant_count counts dur<0 descendants excluded from duration aggregates.
Inputs: slice_ids (required), limit, trace_id, max_depth, +3 more.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 17 tools
Most tools have distinct purposes (page-load summaries, resource hotspots, main-thread hotspots, scroll jank, startup, interactions). However, `chrome_page_load_resource_summary`, `chrome_page_load_resource_hotspots`, and `chrome_page_load_resource_pipeline` all deal with resource URL analysis and could be confused, though their descriptions clarify the intended sequence (summary → hotspots → pipeline). The generic `execute_sql` and `list_*` tools are clearly separate.
All tools follow a consistent snake_case pattern with a clear domain prefix: `chrome_*` for Chrome-specific analysis, `list_*` for exploration, `execute_sql`, `load_trace`, `slice_descendants_breakdown`. Verbs are uniform (list, load, execute, chrome_page_load_*, chrome_main_thread_*) and the naming clearly indicates the tool's function.
17 tools is on the higher side but justified for a comprehensive Perfetto trace analysis server covering Chrome performance domains (page loads, resources, main thread, jank, startup, interactions) plus general SQL and schema exploration. Each tool serves a distinct purpose, and the count reflects the breadth of the domain without being bloated.
The tool set covers major Chrome performance analysis workflows (page loads, resources, main-thread tasks, scroll jank, startup, web interactions) plus generic trace exploration (processes, threads, tables, SQL). Minor gaps exist: no dedicated tool for memory or CPU profile analysis, and the resource pipeline depends on the summary/hotspots sequence, but `execute_sql` covers custom needs.
Maintenance
Related MCP Connectors
Shared memory MCP server for Claude Code, Codex, Gemini CLI and Cursor. Cited, editable.
A comprehensive Model Context Protocol (MCP) server that enables AI assistants to interact with yo…
MCP server for progressive tool usage at any scale (see https://klavis.ai)
Related MCP Servers
- FlicenseAqualityDmaintenanceA FastMCP server that provides LLMs with structured access to Scalene's CPU, GPU, and memory profiling for Python applications. It enables automated performance analysis, bottleneck identification, and optimization suggestions through natural language interactions in supported IDEs.71-
- AlicenseNot gradedqualityBmaintenanceAn MCP server that connects Claude (or any MCP compatible client) to your existing log infrastructure. Query, summarize, and trace logs in plain English across GCP Cloud Logging, AWS CloudWatch, Azure Log Analytics, Grafana Loki, and Elasticsearch without writing filter expressions or leaving your editor.41 npm5MIT
- AlicenseNot gradedqualityBmaintenanceAn MCP server that converts Windows WPR .etl performance traces into structured JSON summaries and flamegraph-ready data for LLM analysis. It bridges Windows Performance Analyzer automation with LLM reasoning capabilities for performance troubleshooting.1MIT
- AlicenseAqualityDmaintenanceMCP server that gives AI agents access to your application's OpenTelemetry traces for querying, analysis, and debugging.517 npm2MIT