Skip to main content
Glama

rocm_info

Read-only

Inspect ROCm installation health including driver version, amdgpu module, installed packages, and tool availability before running workloads.

Instructions

Report the rocm-smi version, kernel driver version, whether the amdgpu module is loaded, installed ROCm/HIP/HSA packages (from dpkg), and whether amdgpu_top is available. Useful for checking ROCm install health before running workloads.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The rocmInfo() async function that implements the tool logic: checks if rocm-smi and amdgpu_top are installed, retrieves rocm-smi version and driver version, checks if amdgpu kernel module is loaded, and lists installed ROCm/HIP/HSA packages via dpkg. Returns a text result with all the gathered info.
    async function rocmInfo() {
      const info = {
        rocm_smi_installed: !!BIN.rocmSmi,
        rocm_smi_path: BIN.rocmSmi,
        amdgpu_top_installed: !!BIN.amdgpuTop,
        amdgpu_top_path: BIN.amdgpuTop,
      };
    
      if (BIN.rocmSmi) {
        const v = await run(BIN.rocmSmi, ['--version']);
        info.rocm_smi_version = (v.stdout || v.stderr || '').trim().split('\n').slice(0, 3).join(' | ') || null;
    
        const d = parseRocmJson((await run(BIN.rocmSmi, ['--showdriverversion', '--json'])).stdout);
        info.driver_version = d && d.system ? d.system['Driver version'] : null;
      }
    
      if (BIN.lsmod) {
        const m = await run(BIN.lsmod);
        info.amdgpu_loaded = /^amdgpu\s/m.test(m.stdout || '');
      }
    
      if (BIN.dpkg) {
        const p = await run(BIN.dpkg, ['-l']);
        const pkgs = (p.stdout || '').split('\n')
          .filter((l) => /^ii\s+(rocm|hip|hsa|amdgpu)/i.test(l))
          .map((l) => {
            const parts = l.split(/\s+/);
            return { name: parts[1], version: parts[2] };
          });
        info.rocm_packages = pkgs;
        info.rocm_packages_count = pkgs.length;
      }
    
      return textResult(info);
    }
  • The tool registration entry in the TOOLS array, providing the name 'rocm_info', a description of what it reports, and an empty inputSchema (no parameters).
    {
      name: 'rocm_info',
      description: 'Report the rocm-smi version, kernel driver version, whether the amdgpu module is loaded, installed ROCm/HIP/HSA packages (from dpkg), and whether amdgpu_top is available. Useful for checking ROCm install health before running workloads.',
      annotations: { title: 'ROCm install info', readOnlyHint: true, destructiveHint: false, openWorldHint: false },
      inputSchema: { type: 'object', properties: {}, additionalProperties: false },
    },
  • server.js:395-401 (registration)
    The HANDLERS mapping that connects the 'rocm_info' tool name to the rocmInfo function for dispatch.
    const HANDLERS = {
      gpu_status: gpuStatus,
      gpu_metrics: gpuMetrics,
      gpu_processes: gpuProcesses,
      gpu_watch: gpuWatch,
      rocm_info: rocmInfo,
    };
Behavior4/5

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

Annotations already declare readOnlyHint=true and destructiveHint=false. The description adds detail on exactly what is reported (versions, packages, etc.), providing behavioral context beyond the annotations.

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?

Single sentence efficiently lists all reported information and includes a usage note. Every word earns its place.

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 simple info tool with no output schema, the description adequately covers purpose and content. Could optionally mention return format, but not necessary.

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?

Tool has zero parameters, so schema covers all. Description adds no parameter info, but this is acceptable given no params. Baseline 4 applies.

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 uses the specific verb 'Report' and lists concrete items (rocm-smi version, kernel driver, etc.), clearly distinguishing this from sibling tools that focus on metrics, processes, or status.

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

Usage Guidelines4/5

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

States explicit use case: 'checking ROCm install health before running workloads.' This guides the agent on when to invoke. While it doesn't explicitly mention alternatives, the context is clear enough.

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/LukeLamb/claude-rocm-mcp'

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