perfetto-mcp-rs
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| RUST_LOG | No | tracing-subscriber filter, e.g. RUST_LOG=debug for verbose logs (written to stderr) | |
| PERFETTO_TP_PATH | No | Path to an existing trace_processor_shell binary; skips auto-download | |
| PERFETTO_QUERY_TIMEOUT_MS | No | Overrides the HTTP status/query timeout in milliseconds | |
| PERFETTO_STARTUP_TIMEOUT_MS | No | Overrides the trace_processor_shell startup timeout in milliseconds |
Capabilities
Features and capabilities supported by this server
| Capability | Details |
|---|---|
| tools | {} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| chrome_main_thread_hotspotsA | Top Chrome main-thread tasks by wall duration: id, name, task_type, thread_name, process_name, dur_ms, cpu_pct (thread_dur/dur), thread_dur_ms. Uses Use when: investigating main-thread responsiveness, finding hot tasks during scroll/load, comparing CPU vs wall time, scoping to one renderer in multi-renderer traces. Don't use for: non-Chrome traces (will error). For background (non-main) thread tasks, drop to Parameters (all optional):
Empty result: either no main-thread tasks exceeded |
| chrome_page_load_summaryA | Summarize each page navigation in a Chrome trace: navigation id, URL, 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 Don't use for: non-Chrome traces (will error). For sub-event timings inside one navigation, drop to Parameters: none — operates on the loaded trace. Empty result: no navigations occurred during capture (e.g. trace started after the page was already loaded). |
| chrome_scroll_jank_summaryA | 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, limit 100. Read-only. Use when: investigating jank reports, finding scroll regressions, ranking jank causes. Prefer over hand-rolling SQL on Don't use for: non-Chrome traces (will error). For per-frame causes outside the top 100, drop to Parameters: none — operates on the loaded trace. Empty result: no janky frames detected (clean trace) or no scrolls occurred during capture. |
| chrome_startup_summaryA | 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 Parameters: none — operates on the loaded trace. Empty result: trace started after the browser was already running (most cases — startup is captured only when tracing began before launch). |
| chrome_web_content_interactionsA | Rank web content interactions in a Chrome trace by duration: id, ts, dur_ms, interaction_type, renderer_upid. Sorted by dur_ms DESC, limit 100. Read-only. Use when: INP (Interaction to Next Paint) analysis, reproducing user-felt latency, finding slow click/tap/keyboard handlers. Don't use for: non-Chrome traces (will error). For interactions outside the top 100 or filtered by Parameters: none — operates on the loaded trace. Empty result: no interactions captured (trace started before user input or interaction tracking was disabled in tracing config). |
| execute_sqlA | 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 ( Don't use for: questions the dedicated Parameters: Empty 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 |
| list_processesA | List every process captured in the trace: upid (trace-internal id), pid (OS pid), name, start_ts, end_ts. Read-only. Use when: entry point for Android and Linux trace analysis, or picking the right Don't use for: Chrome traces — the dedicated 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 |
| list_stdlib_modulesA | List a curated set of PerfettoSQL stdlib modules. Returns a JSON array — each entry has Use when: exploring what's available before writing SQL against an unfamiliar trace type, or discovering modules outside the dedicated Don't use for: discovering all stdlib modules — this is a curated subset of the most useful ones. The exhaustive list lives at https://perfetto.dev/docs/analysis/stdlib-docs. Parameters: none. Then use |
| list_table_structureA | 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 Don't use for: this is a separate MCP tool, not a SQL function — don't write Parameters: Errors when: the table doesn't exist or has no columns. Call |
| list_tablesA | 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 Parameters: optional Empty result: no tables matched the pattern. If a doc-listed table is missing, retry with an explicit pattern in case it's marked internal. Errors when: no trace is loaded — call |
| list_threads_in_processA | List threads inside one process: tid, thread_name, pid, upid. Limit 2000 rows. Use when: drilling into a specific process picked from Don't use for: enumerating ALL threads across the whole trace — use Parameters: pass either Empty result: returned as an error pointing at When the 2000-row cap is hit (system_server, Chrome renderer-fork): drill down via |
| load_traceA | Load a Perfetto trace file for analysis. Every other tool operates on the trace set here. Use when: starting any analysis session — call this first. Don't use for: live trace capture (Perfetto records traces; perfetto-mcp-rs only reads the resulting file) or for streaming URLs (path must be a complete file on local disk). Parameters: Errors when: the file doesn't exist, isn't a valid Perfetto trace, or |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
No prompts | |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
No resources | |
Latest Blog Posts
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/tooluse-labs/perfetto-mcp-rs'
If you have feedback or need assistance with the MCP directory API, please join our Discord server