Skip to main content
Glama

renderdoc_get_buffers

Retrieve and list all buffers from RenderDoc capture files with their properties like size and type to analyze graphics resources for debugging.

Instructions

Get a list of all buffers in the capture with their properties (size, type, etc.).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
filterNoOptional filter pattern for buffer names.

Implementation Reference

  • The main handler for renderdoc_get_buffers tool. It checks if a capture is open, calls wrapper.get_buffers(), applies optional filtering by name, formats the buffer info, and returns the results as text content.
    elif name == "renderdoc_get_buffers":
        if not wrapper.current_file:
            return [TextContent(type="text", text="Error: No capture is currently open.")]
    
        buffers = wrapper.get_buffers()
        filter_pattern = arguments.get("filter", "").lower()
    
        if filter_pattern:
            buffers = [b for b in buffers if filter_pattern in b.name.lower()]
    
        if not buffers:
            return [TextContent(type="text", text="No buffers found.")]
    
        output = [f"Buffers ({len(buffers)} found):\n"]
        for buf in buffers[:100]:
            output.append(_format_buffer_info(buf))
    
        if len(buffers) > 100:
            output.append(f"\n... and {len(buffers) - 100} more")
    
        return [TextContent(type="text", text="\n".join(output))]
  • Tool registration defining the renderdoc_get_buffers tool with its name, description, and input schema including an optional filter parameter for buffer names.
    Tool(
        name="renderdoc_get_buffers",
        description="Get a list of all buffers in the capture with their properties (size, type, etc.).",
        inputSchema={
            "type": "object",
            "properties": {
                "filter": {
                    "type": "string",
                    "description": "Optional filter pattern for buffer names.",
                },
            },
            "required": [],
        },
    ),
  • The get_buffers() implementation in RenderDocWrapper that retrieves all buffers from the open capture using the RenderDoc API, creates BufferInfo objects for each, and handles both native and fallback modes.
    def get_buffers(self) -> list[BufferInfo]:
        """
        Get list of all buffers in the capture.
    
        Returns:
            List of BufferInfo objects.
        """
        if self._use_fallback:
            return self._get_buffers_fallback()
    
        if not self.controller:
            raise RuntimeError("No capture is currently open")
    
        buffers = self.controller.GetBuffers()
        result = []
    
        for buf in buffers:
            result.append(BufferInfo(
                name=buf.name or f"Buffer_{buf.resourceId}",
                resource_id=str(buf.resourceId),
                byte_size=buf.byteSize,
                creation_flags=buf.creationFlags,
            ))
    
        return result
    
    def _get_buffers_fallback(self) -> list[BufferInfo]:
        """Get buffers using renderdoccmd as fallback."""
        return []
  • The BufferInfo dataclass schema defining the structure for buffer information including name, resource_id, byte_size, and creation_flags.
    @dataclass
    class BufferInfo:
        """Information about a buffer resource."""
        name: str
        resource_id: str
        byte_size: int
        creation_flags: int
  • Helper function that formats BufferInfo objects into human-readable text output for display to the user.
    def _format_buffer_info(buf: BufferInfo) -> str:
        """Format buffer info for display."""
        size_kb = buf.byte_size / 1024
        return f"""- {buf.name} (ID: {buf.resource_id})
      Size: {size_kb:.2f} KB ({buf.byte_size} bytes)
      Flags: {buf.creation_flags}"""
Behavior2/5

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

With no annotations, the description carries the full burden of behavioral disclosure. It states it's a read operation ('Get'), but doesn't cover aspects like permissions, rate limits, response format, or whether it requires an active capture. This is a significant gap for a tool with no 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.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence with zero waste. It's front-loaded with the core purpose and includes essential details without unnecessary elaboration.

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?

Given the tool's moderate complexity (list operation with one optional parameter), no annotations, and no output schema, the description is minimally adequate. It covers the purpose but lacks behavioral context and usage guidelines, leaving gaps that could hinder effective tool selection and invocation.

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 the schema already documents the optional 'filter' parameter. The description doesn't add any parameter-specific details beyond what's in the schema, such as examples of filter patterns or how filtering works. Baseline 3 is appropriate when the schema handles parameter documentation.

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 clearly states the verb ('Get') and resource ('list of all buffers in the capture'), specifying what properties are included ('size, type, etc.'). It distinguishes from siblings like 'renderdoc_get_textures' by focusing on buffers, but doesn't explicitly contrast with other buffer-related tools (none listed).

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No guidance on when to use this tool versus alternatives is provided. The description doesn't mention prerequisites, context (e.g., after opening a capture), or exclusions, leaving the agent to infer usage from the tool name alone.

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/Hengle/Renderdoc-Mcp2'

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