Skip to main content
Glama

gpu_status

Read-only

Get a one-shot summary of all AMD GPUs showing product name, GPU utilization, VRAM usage, temperatures, power, and fan speed. Each card's unsupported fields return null.

Instructions

One-shot summary of all AMD GPUs: product name, GPU utilization %, VRAM used/total bytes and %, edge/junction/memory temperatures, average and max power, fan speed % and RPM. Returns one entry per card. Fields that the card does not support are returned as null (not omitted).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The gpuStatus() function is the main handler for the gpu_status tool. It shells out to `rocm-smi -a --json` and `rocm-smi --showmeminfo vram --json`, parses the output, and returns a structured summary of each GPU card including utilization, VRAM, temperature, power, and fan metrics.
    async function gpuStatus() {
      const missing = requireRocmSmi();
      if (missing) return errorResult(missing);
    
      const r = await run(BIN.rocmSmi, ['-a', '--json']);
      if (r.code !== 0 && !r.stdout) {
        return errorResult(`rocm-smi failed (code ${r.code}): ${r.stderr || 'no output'}`);
      }
      const data = parseRocmJson(r.stdout);
      if (!data) return errorResult(`rocm-smi returned no parseable JSON. stderr: ${r.stderr || '<empty>'}`);
    
      // VRAM in bytes needs a separate call — showallinfo only gives VRAM %.
      const vramRaw = parseRocmJson((await run(BIN.rocmSmi, ['--showmeminfo', 'vram', '--json'])).stdout) || {};
    
      const cards = cardKeys(data).map((k) => {
        const c = data[k];
        const v = vramRaw[k] || {};
        return {
          card: k,
          name: c['Card Series'] || c['Card Model'] || c['Device Name'] || null,
          gfx_version: c['GFX Version'] || null,
          pci_bus: c['PCI Bus'] || null,
          utilization_percent: numOrNull(c['GPU use (%)']),
          vram_percent: numOrNull(c['GPU Memory Allocated (VRAM%)']),
          vram_used_bytes: numOrNull(v['VRAM Total Used Memory (B)']),
          vram_total_bytes: numOrNull(v['VRAM Total Memory (B)']),
          temp_edge_c: numOrNull(c['Temperature (Sensor edge) (C)']),
          temp_junction_c: numOrNull(c['Temperature (Sensor junction) (C)']),
          temp_memory_c: numOrNull(c['Temperature (Sensor memory) (C)']),
          power_avg_w: numOrNull(c['Average Graphics Package Power (W)']),
          power_max_w: numOrNull(c['Max Graphics Package Power (W)']),
          fan_percent: numOrNull(c['Fan speed (%)']),
          fan_rpm: numOrNull(c['Fan RPM']),
        };
      });
    
      return textResult({
        timestamp: new Date().toISOString(),
        card_count: cards.length,
        cards,
      });
    }
  • Schema/registration entry for the 'gpu_status' tool in the TOOLS array. Defines the tool name, description, annotations (read-only), and an empty inputSchema (no parameters).
      name: 'gpu_status',
      description: 'One-shot summary of all AMD GPUs: product name, GPU utilization %, VRAM used/total bytes and %, edge/junction/memory temperatures, average and max power, fan speed % and RPM. Returns one entry per card. Fields that the card does not support are returned as null (not omitted).',
      annotations: { title: 'GPU status summary', readOnlyHint: true, destructiveHint: false, openWorldHint: false },
      inputSchema: { type: 'object', properties: {}, additionalProperties: false },
    },
  • server.js:395-401 (registration)
    HANDLERS mapping object that maps tool name 'gpu_status' to the gpuStatus function for dispatch.
    const HANDLERS = {
      gpu_status: gpuStatus,
      gpu_metrics: gpuMetrics,
      gpu_processes: gpuProcesses,
      gpu_watch: gpuWatch,
      rocm_info: rocmInfo,
    };
  • requireRocmSmi() helper used by gpu_status to check if rocm-smi binary is available before running.
    function requireRocmSmi() {
      if (!BIN.rocmSmi) {
        return 'rocm-smi is not installed. Install with: sudo apt install rocm-smi (or a full ROCm stack). See https://rocm.docs.amd.com/ for installation options.';
      }
      return null;
  • parseRocmJson() helper used by gpu_status to parse rocm-smi's JSON output, with fallback for banner text.
    function parseRocmJson(stream) {
      const trimmed = (stream || '').trim();
      if (!trimmed) return null;
      if (/No JSON data to report/i.test(trimmed)) return null;
      try {
        return JSON.parse(trimmed);
      } catch (_) {
        const start = trimmed.indexOf('{');
        const end = trimmed.lastIndexOf('}');
        if (start >= 0 && end > start) {
          try { return JSON.parse(trimmed.slice(start, end + 1)); } catch (_) {}
        }
        return null;
      }
Behavior3/5

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

Annotations already declare readOnlyHint=true and destructiveHint=false. Description adds that unsupported fields return null, which is useful but not extensive. No contradiction.

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 concise sentence listing all fields. No wasted words.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Despite no output schema, description explains return structure (one entry per card, null for unsupported fields). Complete for the tool's simplicity.

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?

No parameters, schema coverage 100% trivially. Description doesn't add parameter meaning, but none needed. Baseline 4 is appropriate.

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?

Description clearly states it provides a 'one-shot summary of all AMD GPUs' and lists specific fields, distinguishing it from siblings like gpu_metrics which likely provide more detailed historical data.

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

Usage Guidelines3/5

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

No explicit when-to-use or alternatives mentioned. The description implies it is for a quick overview, but does not guide against using other tools for specific needs.

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