Skip to main content
Glama

get_gpu_memory

Retrieve total, used, and free VRAM in bytes for a specified GPU to assess memory availability before loading or running AI models.

Instructions

VRAM total/used/free in bytes for one GPU.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "gpu_id": "<gpu_id>"
    },
    "name": "get_gpu_memory"
  }
}

Input Schema

NameRequiredDescriptionDefault
gpu_idYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

C2.8/5.0
Behavior2/5

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

With no annotations, the description carries the full behavioral burden. It usefully discloses the returned fields and their unit (bytes), but says nothing about permissions, behavior when the GPU id is invalid, or whether values are a live snapshot — so beyond stating the data shape it adds little behavioral context.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

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

A single front-loaded sentence with zero filler and the unit stated immediately. Its brevity is close to under-specification, which is captured in the other dimensions rather than here.

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?

For a one-parameter read tool the description is minimally sufficient: because there is no output schema, naming the returned fields and units is genuinely valuable. It still omits how to obtain a valid gpu_id and any error behavior, so an agent could invoke it with a malformed id and be surprised.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0% for gpu_id, so the description should compensate. 'For one GPU' hints that gpu_id selects a device but gives no format, no source (e.g., an id from list_gpus), and no constraint guidance, leaving the only parameter effectively undocumented.

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 names a specific metric set (VRAM total/used/free in bytes) scoped to a single GPU, which implicitly separates it from siblings like get_gpu_utilization, get_gpu_temperature, and get_system_gpu_summary. It never uses a verb, but the read-only intent is unambiguous.

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 when-to-use guidance, no comparison to alternatives such as get_all_gpu_metrics or get_gpu_info, and no note that only one GPU is covered (versus the system-wide sibling). The agent must infer selection from the metric name alone.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.