Skip to main content
Glama
lpenguin
by lpenguin

get_frame_stats

Sample live frame-health metrics to detect dropped frames and CPU-bound rendering, returning FPS, frame times, and a CPU vs GPU/vsync bound verdict.

Instructions

Sample a live page's frame-health metrics over a short window (without taking a capture) and return aggregates: frame rate (fps), average and worst frame time, dropped frames, CPU submit time (main-thread cost per frame), the estimated display refresh interval, and a CPU-vs-GPU/vsync bound verdict. Use this to tell whether a page is dropping frames and whether it's CPU/main-thread bound; GPU time is not measured live, so a non-CPU verdict reads "GPU/vsync" — take a capture with profilePasses:true to measure GPU time and confirm. Requires the page's rendering loop to use requestAnimationFrame.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pageIdNoPage to sample. Optional when exactly one page is connected.
durationMsNoSampling window in milliseconds (default 1000, clamped 100–10000).
Behavior5/5

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

With no annotations provided, the description carries the full behavioral burden. It discloses that it samples without side effects ('without taking a capture'), provides a precise list of what the tool measures (frame rate, dropped frames, CPU submit time, etc.), explicitly notes the limitation ('GPU time is not measured live'), and states the environmental requirement (requestAnimationFrame). This is far more transparent than many tools with annotation coverage.

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 dense but not bloated—two sentences with a trailing requirement clause. It front-loads the core purpose and return values, then adds usage guidance and a prerequisite. It could be trimmed slightly (the list of metrics is long) but every sentence earns its place, and the structure is logical.

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 no annotations, no output schema, and only two optional parameters, the description covers what the tool does, when to use it, limitations, and a prerequisite. The only minor gap is that it doesn't specify what happens if the page doesn't use requestAnimationFrame (errors? null results?), but this is a rare edge case and the description already implies the requirement clearly. Overall, an agent can call this tool correctly.

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 description coverage is 100%, so both pageId and durationMs are already documented in the schema. The description adds little beyond the schema's own parameter descriptions—it mentions 'short window' and 'clamped 100–10000' which are already in the schema. Baseline 3 is appropriate since the schema does the heavy lifting and the description doesn't add meaningful new semantics.

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 opens with a specific verb ('Sample'), a resource ('live page's frame-health metrics'), and a distinguishing constraint ('without taking a capture'), then enumerates the exact aggregates returned. That level of specificity lets an agent immediately separate this from sibling tools like capture_frames or analyze_performance without needing to open their schemas.

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?

It gives explicit when-to-use ('tell whether a page is dropping frames and whether it's CPU/main-thread bound'), a clear when-not-to-use (GPU time is not measured live, so take a capture with profilePasses:true to measure GPU time), and even names the alternative action ('take a capture with profilePasses:true'). It also states a prerequisite ('Requires the page's rendering loop to use requestAnimationFrame'). This is textbook routing.

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/lpenguin/webgpu_inspector_mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server