Skip to main content
Glama

chrome_page_load_script_hotspots

Read-onlyIdempotent

Rank renderer main-thread script groups by wall and CPU time per navigation phase to pinpoint JavaScript causing slow page loads.

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
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.
limitNoOptional max rows to return. Defaults to 100 and is capped at 5000. Must be > 0 when set.
machine_idNoOptional machine id filter for multi-machine traces when the trace schema has `process.machine_id`. Accepts numbers and numeric strings.
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.
min_total_msNoOptional minimum aggregated wall time per grouped script hotspot. Defaults to 20 ms. Pass 0 to see every matching group.
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`.
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`.
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.
pidNoOptional OS pid filter. Accepts both numbers and numeric strings.
process_nameNoOptional process-name filter (e.g. "Renderer"). Useful to scope one process type without picking a specific instance.
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.
upidNoOptional trace-internal upid filter. Prefer this when distinguishing same-named Renderer processes. Accepts numbers and numeric strings.
Behavior4/5

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

Annotations already indicate readOnlyHint=true, destructiveHint=false, idempotentHint=true. The description adds it is read-only and ranks script groups with wall/CPU totals, providing behavioral context beyond annotations. No contradictions.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Two concise paragraphs: first sentence covers purpose and output, second paragraph gives usage and parameter summary. No fluff, front-loaded with key info.

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 12 parameters, no output schema, and annotations covering safety, the description explains the tool's output fields, parameter groups, and how to use example_slice_id with a sibling tool. Could mention if ranking is descending by wall time, but otherwise complete.

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?

Input schema has 100% description coverage for all 12 parameters, so the schema does the heavy lifting. The description adds minimal extra meaning (e.g., default min_total_ms=20, shared filter context), but not enough to raise the score above baseline.

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 it ranks renderer main-thread script groups, listing output fields (URL, name, process, etc.). It distinguishes itself from siblings by noting shared filters with chrome_main_thread_hotspots and specifying the use case for slow FCP/load needing JS attribution.

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?

Explicitly states when to use: 'slow FCP/load needs post-resource JS attribution' and how to extend results via `slice_descendants_breakdown`. Also mentions parameters shared with a sibling tool, and explains empty result meaning.

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