Skip to main content
Glama

renderdoc_get_capture_info

Retrieve detailed information about an open RenderDoc capture, including API, driver, and resource counts for graphics debugging.

Instructions

Get detailed information about the currently open capture including API, driver, and resource counts.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The handler for 'renderdoc_get_capture_info' tool that checks if a capture is open and retrieves capture information using the wrapper's _get_capture_info() method, then formats the output for display.
    elif name == "renderdoc_get_capture_info":
        if not wrapper.current_file:
            return [TextContent(type="text", text="Error: No capture is currently open. Use renderdoc_open_capture first.")]
    
        info = wrapper._get_capture_info() if not wrapper._use_fallback else None
        if info:
            return [TextContent(type="text", text=_format_capture_info(info))]
        return [TextContent(type="text", text="Error: Unable to get capture info.")]
  • Tool registration defining 'renderdoc_get_capture_info' with its name, description, and input schema (no required parameters).
    Tool(
        name="renderdoc_get_capture_info",
        description="Get detailed information about the currently open capture including API, driver, and resource counts.",
        inputSchema={
            "type": "object",
            "properties": {},
            "required": [],
        },
    ),
  • The _get_capture_info() helper method that implements the actual RenderDoc API calls to retrieve capture details including API properties, resource counts, and frame information.
    def _get_capture_info(self) -> CaptureInfo:
        """Get capture information using native API."""
        if not self.controller:
            raise RuntimeError("No capture is currently open")
    
        # Get API properties
        api_props = self.controller.GetAPIProperties()
        driver_name = api_props.pipelineType
    
        # Map pipeline type to API name
        api_type_map = {
            rd.GraphicsAPI.D3D11: "D3D11",
            rd.GraphicsAPI.D3D12: "D3D12",
            rd.GraphicsAPI.Vulkan: "Vulkan",
            rd.GraphicsAPI.OpenGL: "OpenGL",
            rd.GraphicsAPI.OpenGLES: "OpenGLES",
            rd.GraphicsAPI.Metal: "Metal",
        }
        api_type = api_type_map.get(driver_name, "Unknown")
    
        # Count resources
        textures = self.controller.GetTextures()
        buffers = self.controller.GetBuffers()
    
        # Count draw calls in frame
        frame_info = self.controller.GetFrameInfo()
        draw_call_count = len(frame_info.drawcalls) if hasattr(frame_info, 'drawcalls') else 0
    
        return CaptureInfo(
            file_path=self.current_file or "",
            driver_name=api_props.localRenderer or "Unknown",
            api_type=api_type,
            machine_ident=api_props.machineIdent if hasattr(api_props, 'machineIdent') else None,
            frame_count=1,
            draw_call_count=draw_call_count,
            texture_count=len(textures),
            buffer_count=len(buffers),
        )
  • The _format_capture_info() helper function that formats the CaptureInfo dataclass into a human-readable text output with file path, API type, driver info, and resource counts.
    def _format_capture_info(info: CaptureInfo) -> str:
        """Format capture info for display."""
        return f"""Capture Information:
    - File: {info.file_path}
    - API: {info.api_type}
    - Driver: {info.driver_name}
    - Machine ID: {info.machine_ident or 'N/A'}
    - Frame Count: {info.frame_count}
    - Draw Calls: {info.draw_call_count}
    - Textures: {info.texture_count}
    - Buffers: {info.buffer_count}"""

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