Skip to main content
Glama

Get job GPU metrics

get_job_metrics
Read-onlyIdempotent

A job's GPU use while its command ran, oldest first: [{ at, gpus: [{ util, mem_used_mb, mem_total_mb }] }], one point per step seconds, util the average percent and memory the peak over the step. get_job has the totals (gpu_util_avg, gpu_mem_peak_mb). Low util on a long job means the GPU mostly waited: check data loading or the batch size.

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": {
      "id": "<id>"
    },
    "name": "get_job_metrics"
  }
}

Input Schema

NameRequiredDescriptionDefault
idYesJob ID
stepNoSeconds per point, 60 to 86400 (default 60)
workspaceNoWorkspace ID (optional: defaults to the authenticated workspace)
environmentNoEnvironment name (optional: defaults to the environment this session acts in)

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changed
    • removedInput schema / properties / env
      Removed value: -{
      -  "description": "Environment name (optional — defaults to main)",
      -  "type": "string"
      -}
    • addedInput schema / properties / environment
      Added value: +{
      +  "description": "Environment name (optional: defaults to the environment this session acts in)",
      +  "type": "string"
      +}
    • changedInput schema / properties / workspace / description
      Previous value: -"Workspace ID (optional — defaults to authenticated workspace)"New value: +"Workspace ID (optional: defaults to the authenticated workspace)"
  2. Added

TDQS

A4.4/5.0
Behavior4/5

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

Annotations already declare readOnly, idempotent, non-destructive, closed-world, so safety is covered. The description adds behavior the annotations cannot: per-step aggregation semantics (util is the average percent, memory is the peak over the step), ordering (oldest first), and the relationship to get_job's totals. It omits retention window, pagination/truncation limits, and behavior for jobs without GPUs.

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?

Front-loaded with the return shape, then the alternative tool, then the actionable interpretation, in three tight sentences with no filler. The inline schema-like notation is dense but readable and appropriate for an API-facing agent.

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?

With no output schema, the description carries the burden of describing the return value and does so concretely, including element names and aggregation semantics. It is short of complete only on edge cases: empty/no-GPU results, time-window bounds, and whether long ranges are downsampled or truncated.

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?

Schema coverage is 100%, so the baseline is 3; the description earns an extra point by explaining what 'step' actually means — one point per step seconds, with averaging/peak applied over that interval — which the schema only describes as 'Seconds per point'. The id/workspace/environment parameters get no elaboration, but the schema already carries them.

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?

States a specific resource and scope: per-step GPU utilization and memory for a single job's command run, ordered oldest first, with an inline return shape. It explicitly distinguishes itself from get_job, which 'has the totals (gpu_util_avg, gpu_mem_peak_mb)', so an agent can separate the two without opening either schema.

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?

Points at the alternative (get_job for aggregate totals) and gives a concrete diagnostic use case — low util on a long job means the GPU waited, check data loading or batch size. There is no explicit when-not statement (e.g. don't use for non-GPU jobs or for totals), which keeps it below a 5.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.