Skip to main content
Glama
lpenguin
by lpenguin

capture_frames

Capture one or more WebGPU frames, returning command/draw/pass counts, validation errors, and optional per-pass GPU timing for performance analysis.

Instructions

Ask a connected page to capture one or more WebGPU frames, then return a summary of the resulting capture (command/draw/pass counts, object counts, validation errors, flagged issues). Use list_pages first if unsure. For a PERFORMANCE analysis, set profilePasses:true (and payloads:"none" for a light perf-only capture) to measure per-pass GPU time, then call analyze_performance — treat a performance request as implying profilePasses:true.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
framesNoNumber of frames to capture (default 1).
pageIdNoPage to capture from. Optional when exactly one page is connected.
passTypeNoOptional: only capture heavy payloads for passes of this type.
payloadsNoConvenience over maxBufferSize/maxTextureSize for capturing a large frame (e.g. a full game world) without a heavy upload. "none" records only the command list, object graph and validation errors — no buffer/texture bytes — which is the fastest way to inspect draw calls, passes and pipeline usage at scale. "buffers" or "textures" keeps only that payload kind. "all" (default) keeps both, subject to the maxBufferSize/maxTextureSize caps. Explicit maxBufferSize/maxTextureSize override this.
passLabelNoOptional: only capture heavy payloads (buffers/textures) for render/compute passes whose label matches this regular expression. Greatly shrinks captures of large frames by skipping unrelated passes (shadows, IBL, post).
maxBufferSizeNoOptional cap, in bytes, applied to EVERY captured buffer payload (vertex/index/storage/uniform/indirect). Buffers larger than this are truncated to the first N bytes (recorded as truncated). Default 64KB. Use -1 to disable.
profilePassesNoInject per-pass GPU timestamp queries so each render/compute pass in the capture carries a measured GPU duration (surfaced in get_capture_summary's passes breakdown as durationMs, and as frameGpuTimeMs total). Requires the adapter to support the "timestamp-query" feature (the inspector enables it automatically when available); a no-op otherwise. Default false. Pairs well with payloads:"none" for a light perf pass.
maxTextureSizeNoOptional cap, in bytes, on each captured texture's pixel data. Textures larger than this are skipped (descriptor still recorded), keeping captures light. Default 16MB. Use -1 to capture all texture data.
Behavior3/5

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

No annotations are provided, so the description carries the full burden of behavioral disclosure. It does disclose useful traits: captures can be heavy/light (payloads:'none' for light capture), returns a summary, and the implied behavior that captures could be large (mention of shrinking via passLabel). However, it lacks explicit notes on side effects, error conditions, or whether the operation modifies state. It adds context but not a comprehensive behavioral 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?

Four sentences, front-loaded with the core purpose, then flow into usage guidance. No redundant repetition of schema details, and each sentence carries meaningful information. Structure is logical and efficient, though a bulleted format could slightly improve scannability.

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?

For a tool with 8 parameters, no output schema, and no annotations, the description is fairly complete. It explains the core behavior, provides performance-specific guidance, and names a follow-up tool (analyze_performance). It doesn't cover every edge case (e.g., error handling, capture persistence), but covers the primary usage scenarios an agent needs to invoke it correctly.

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 baseline is 3. The description enhances parameter semantics by linking profilePasses and payloads to performance analysis ('set profilePasses:true (and payloads:"none" for a light perf-only capture)'), and clarifying the implication of performance requests. This adds usage context beyond the schema's individual parameter descriptions, justifying a 4.

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?

The description states the specific action (capture one or more WebGPU frames) and the resource (a connected page), then details the returned summary (command/draw/pass counts, object counts, validation errors, flagged issues). It distinguishes itself from analyze_performance by explicitly naming that as the performance-analysis follow-up, and mentions list_pages for initial selection. Clear and specific, though it doesn't explicitly contrast with all capture-related siblings like get_capture_summary.

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?

Provides explicit when-to-use guidance: 'Use list_pages first if unsure' establishes a prerequisite, and 'For a PERFORMANCE analysis, set profilePasses:true ... then call analyze_performance' gives a concrete usage pattern. It further states that a performance request implies profilePasses:true, offering a clear rule for invocation. This goes beyond generic context to actionable instructions.

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