Skip to main content
Glama
lpenguin
by lpenguin

read_buffer

Read live GPU buffer contents directly from a connected page, decoding bytes as uint8, float32, or other types, without needing a full capture.

Instructions

Read the current contents of a live GPU buffer on a connected page, without taking a full capture. The inspector copies the buffer to a readback buffer, maps it, and returns the bytes decoded as the requested type. The source buffer must have been created with COPY_SRC usage (buffers created while a capture is armed are given COPY_SRC).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
sizeNoNumber of bytes to read (default: to end of buffer, capped).
typeNoHow to decode the returned bytes (default float32).
offsetNoByte offset to start reading at (default 0).
pageIdNoPage to read from. Optional when exactly one page is connected.
bufferIdYesNumeric id of the GPU Buffer object to read.
Behavior5/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It explains the internal mechanism (copy to readback buffer, map, decode) and discloses a critical constraint (COPY_SRC usage requirement), which is essential for the agent to understand potential failures. This is transparent and detailed.

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?

The description is two sentences with no filler. The first sentence states purpose and contrast, the second explains mechanism and constraint. It is front-loaded with the most relevant information (

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?

The tool has 5 parameters and no output schema, so the description needs to provide sufficient context. It covers the purpose, mechanism, and a key prerequisite, and mentions that the buffer is live and on a connected page. However, it does not describe anticipated failure modes (e.g., buffer without COPY_SRC) or the exact structure of the returned data, which would be helpful but not strictly necessary given the schema.

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?

The schema covers 100% of parameters with descriptions, so the baseline is 3. The description adds minimal parameter-specific meaning beyond the schema; it does not elaborate on 'size', 'offset', or 'type' beyond what the schema already states, but it does clarify the overall decoding behavior. Thus it meets the baseline without exceeding it.

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 identifies the verb 'Read' and the resource 'current contents of a live GPU buffer', and distinguishes it from a full capture by stating 'without taking a full capture'. It also specifies the context of 'on a connected page'. This is a clear, specific purpose that differentiates it from sibling tools like read_texture and decode_vertex_buffer.

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?

The description explicitly states when to use this tool (to read a live buffer) and when not to (instead of a full capture), and provides a prerequisite ('buffer must have been created with COPY_SRC usage'). It implicitly contrasts with capture tools and gives context for the connected page requirement, offering clear usage guidance without ambiguity.

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