Skip to main content
Glama

chrome_page_load_script_hotspots

Read-onlyIdempotent

Rank script hotspot groups on the renderer main thread to pinpoint JavaScript contributing to slow page loads, with wall time, CPU totals, and style/layout metrics.

Instructions

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.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pidNoOptional OS pid filter. Accepts both numbers and numeric strings.
upidNoOptional trace-internal upid filter. Prefer this when distinguishing same-named Renderer processes. Accepts numbers and numeric strings.
limitNoOptional max rows to return. Defaults to 100 and is capped at 5000. Must be > 0 when set.
phaseNoOptional page-load phase window. If set without `page_load_id` or `navigation_id`, uses the latest page load in the trace. Values: navigation_to_fcp, navigation_to_load, dcl_to_fcp, fcp_to_load.
trace_idNoOptional trace id returned by `load_trace`. Omit to use the active trace.
end_ts_nsNoOptional raw trace timestamp upper bound in nanoseconds, exclusive. This uses the same unit as trace `slice.ts`. ANDs with any page-load window.
machine_idNoOptional machine id filter for multi-machine traces when the trace schema has `process.machine_id`. Accepts numbers and numeric strings.
start_ts_nsNoOptional raw trace timestamp lower bound in nanoseconds. This uses the same unit as trace `slice.ts`. ANDs with any page-load window.
min_total_msNoOptional minimum aggregated wall time per grouped script hotspot. Defaults to 20 ms. Pass 0 to see every matching group.
page_load_idNoOptional page-load id used to scope scripts to one navigation phase. Matches `chrome_page_loads.id`. Mutually exclusive with `navigation_id`. If set without `phase`, defaults to `navigation_to_fcp`.
process_nameNoOptional process-name filter (e.g. "Renderer"). Useful to scope one process type without picking a specific instance.
navigation_idNoOptional Chrome navigation id used to scope scripts to one navigation phase. Matches `chrome_page_loads.navigation_id`. Mutually exclusive with `page_load_id`. If set without `phase`, defaults to `navigation_to_fcp`.
max_string_lenNoOptional per-string-cell character cap applied to returned rows only. Unset preserves full strings for precision; accepts both numbers and numeric strings. Must be > 0 when set.
Behavior4/5

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

Annotations already declare readOnlyHint=true and idempotentHint=true. The description adds that it is 'Read-only' and describes the ranking behavior with optional filters, plus mentions empty result meaning. Provides useful operational context beyond safety profile.

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?

The description is two paragraphs with core purpose front-loaded, then usage and parameter guidance. It is efficient without being overly verbose. Every sentence adds value, though the parameter list is somewhat redundant with schema.

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?

Given 13 parameters and no output schema, the description explains output fields (URL, name, totals, etc.) and links to sibling for expansion. It provides sufficient context for a read-only analysis tool, covering what results look like and how to use them.

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 coverage is 100%, so baseline is 3. Description repeats some default values (min_total_ms=20) and lists filter types but adds little new detail beyond the schema. Mentions 'Empty result: no matching script groups' which is a minor addition.

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?

The description clearly states the tool ranks renderer main-thread script groups in a Chrome page-load/raw window, listing specific output fields like URL, name, wall/CPU totals. It distinguishes itself by mentioning 'post-resource JS attribution' and referencing the sibling tool for expansion.

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?

Explicitly states 'Use when: slow FCP/load needs post-resource JS attribution' and guides to expand `example_slice_id` with `slice_descendants_breakdown`. It also notes that parameters are shared with `chrome_main_thread_hotspots`. Lacks explicit when-not-to-use compared to siblings.

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

Install Server

Other Tools

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