Skip to main content
Glama

frames

Records page performance, reporting main-thread frame rate, dropped renders, long animation tasks, layout shifts, and slowest interaction (INP). Optionally runs an action like click or scroll.

Instructions

Record the page for duration_ms and report how smooth it ran: main-thread frame rate and dropped frames, Long Animation Frames (duration, blocking time, render and style/layout start, the scripts responsible), layout shifts with the elements that moved (CLS for the window only), and the slowest interaction (INP for the window, split into input delay, processing, presentation; needs trusted input, synthetic events have no interaction id). Optionally runs an action (click, hover, scroll, key) right after recording starts. Animations that started are counted too. Compositor-only animations can stay smooth while the main thread drops frames. Refuses on a hidden page: rAF and observers stop there. For load speed use perf_trace; for the settings of each animation, animations.

Input Schema

NameRequiredDescriptionDefault
limitNoMax long frames listed; counts include all
actionNoAction run right after recording starts
tab_idNoTarget tab; omitted = last tab navigated in this session, else the active one
frame_idNoTarget iframe id from get_frames; omitted = main frame
duration_msNoRecording window in ms (max 30000)
threshold_msNoLong frames shorter than this are not listed

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv1.28.0

TDQS

A4.8/5.0
Behavior5/5

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

Annotations only declare readOnlyHint=false/idempotentHint=false without saying why; the description explains the cause (an optional click/hover/scroll/key action runs right after recording starts). It further discloses the hidden-page refusal, the trusted-input requirement for INP, and the compositor-vs-main-thread nuance that 'compositor-only animations can stay smooth while the main thread drops frames.'

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?

Front-loaded with the core purpose before caveats and alternatives, and every sentence carries information (metrics, action behavior, refusal, sibling routing). It is a dense block rather than skimmable bullets, which costs it a point but nothing reads as filler.

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

Completeness5/5

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

With no output schema, the description carries the full burden of describing returns and does so thoroughly: the metric list, the INP breakdown (input delay/processing/presentation), CLS scope, and the LoAF sub-fields. An agent knows what it will get back and under what conditions the tool fails.

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

Parameters4/5

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

Schema coverage is 100%, so the baseline is 3, but the description adds meaning beyond the schema: it frames the action as optional and run 'right after recording starts', and its trusted-input note maps directly onto the `trusted` parameter's purpose (why hover defaults to real input). The metric-to-parameter mapping (duration_ms window, limit, threshold_ms) is still left to the schema.

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?

Opens with a specific verb+resource ('Record the page for duration_ms and report how smooth it ran') and enumerates the concrete metrics produced: main-thread frame rate, dropped frames, Long Animation Frames, layout shifts/CLS, and INP. It explicitly distinguishes itself from siblings by naming perf_trace and animations and the conditions that select them.

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?

Gives explicit routing: 'For load speed use perf_trace; for the settings of each animation, animations.' It also states a hard exclusion ('Refuses on a hidden page: rAF and observers stop there') and the INP caveat ('needs trusted input, synthetic events have no interaction id'). When/when-not/alternatives are all covered.

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