Skip to main content
Glama

profiler.trace.long_tasks

Read-only

Extract long main-thread tasks from a recorded browser trace to identify what blocked or hung the page, returning task details without loading the full trace into context.

Instructions

Pull the long main-thread tasks out of a recorded trace. Answers "what hung the page" without the trace ever entering the context.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "artifact_id": "<artifact_id>"
    },
    "name": "profiler.trace.long_tasks"
  }
}

Input Schema

NameRequiredDescriptionDefault
limitNo
artifact_idYes
min_duration_msNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

B3.3/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=true and openWorldHint=true, so the safety profile is covered. The description adds one genuinely useful behavioral fact — the trace itself never enters context, meaning the result is a distilled summary rather than raw trace data — but says nothing about output shape, default limits, or whether results are truncated.

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 sentences, front-loaded with the action and followed by the question it answers. Nothing is padded or redundant.

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

Completeness3/5

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

For a small read-only query tool with no output schema this is close to adequate, but the 0%-covered schema means the agent is left guessing about artifact_id's source, units, and defaults for limit and min_duration_ms. One clause fixing those would make it complete.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, so the description must explain the three parameters and does not. artifact_id's origin (presumably from profiler.trace.stop) is unstated, and neither limit nor min_duration_ms is mentioned, even though min_duration_ms is the parameter that defines what counts as a 'long' task.

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: 'Pull the long main-thread tasks out of a recorded trace,' plus a plain-language outcome ('what hung the page'). An agent can tell this is a trace post-analysis query rather than a start/stop control, though it does not name a specific sibling such as profiler.cpu.analyze as the alternative.

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?

The 'what hung the page' framing implies the diagnostic use case, and 'recorded trace' hints at the prerequisite that a trace must already exist. It never states when to prefer this over profiler.cpu.analyze or another trace-derived view, and no exclusions are given.

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

Deploy Server

Other Tools