Skip to main content
Glama

reserve

Claim GB of GPU VRAM for non-Ollama jobs so other sessions see capacity is taken; TTL expiry clears stale claims.

Instructions

Reserve gb GB of VRAM — a claim on capacity, not on a named model.

Use this for non-Ollama GPU work (a training run, a diffusion job) so other sessions can see the VRAM is spoken for. pid is advisory. Reservations expire by TTL like claims, so a crashed session never leaves one stuck.

COOPERATIVE: this gates vram-mcp's own warm(), but vram-mcp cannot intercept an Ollama auto-load triggered by a direct /api/generate call from another process.

Input Schema

NameRequiredDescriptionDefault
gbYes
pidNo
ownerYes
purposeYes
ttl_secondsNo

Output Schema

NameRequiredDescriptionDefault
gbYes
okYes
modelYes
detailYes
reasonYes
outcomeYes
summaryYes
claim_idYes
expires_atYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv0.3.1
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "properties": {
      +    "claim_id": {
      +      "anyOf": [
      +        {
      +          "type": "string"
      +        },
      +        {
      +          "type": "null"
      +        }
      +      ],
      +      "title": "Claim Id"
      +    },
      +    "detail": {
      +      "anyOf": [
      +        {
      +          "type": "string"
      +        },
      +        {
      +          "type": "null"
      +        }
      +      ],
      +      "title": "Detail"
      +    },
      +    "expires_at": {
      +      "anyOf": [
      +        {
      +          "type": "string"
      +        },
      +        {
      +          "type": "null"
      +        }
      +      ],
      +      "title": "Expires At"
      +    },
      +    "gb": {
      +      "anyOf": [
      +        {
      +          "type": "number"
      +        },
      +        {
      +          "type": "null"
      +        }
      +      ],
      +      "title": "Gb"
      +    },
      +    "model": {
      +      "anyOf": [
      +        {
      +          "type": "string"
      +        },
      +        {
      +          "type": "null"
      +        }
      +      ],
      +      "title": "Model"
      +    },
      +    "ok": {
      +      "title": "Ok",
      +      "type": "boolean"
      +    },
      +    "outcome": {
      +      "enum": [
      +        "succeeded",
      +        "refused",
      +        "failed",
      +        "unknown"
      +      ],
      +      "title": "Outcome",
      +      "type": "string"
      +    },
      +    "reason": {
      +      "anyOf": [
      +        {
      +          "type": "string"
      +        },
      +        {
      +          "type": "null"
      +        }
      +      ],
      +      "title": "Reason"
      +    },
      +    "summary": {
      +      "title": "Summary",
      +      "type": "string"
      +    }
      +  },
      +  "required": [
      +    "ok",
      +    "outcome",
      +    "model",
      +    "reason",
      +    "detail",
      +    "summary",
      +    "claim_id",
      +    "expires_at",
      +    "gb"
      +  ],
      +  "title": "ReserveResult",
      +  "type": "object"
      +}
  2. First observedv0.2.0

TDQS

A4.4/5.0
Behavior4/5

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

With no annotations, the description carries the full burden and does well: it discloses TTL-based expiry, crash-safety (no stuck reservations), that `pid` is advisory only, and honestly flags the cooperative-only enforcement limit. It does not say what happens when insufficient VRAM is free (fail vs. oversubscribe) or whether reservations are per-owner, which are material behaviors for a capacity tool.

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 purpose sentence, then usage, then caveats, with a labeled COOPERATIVE paragraph for the most surprising constraint. Every sentence adds information; no filler.

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?

An output schema exists, so return values need no explanation, and the behavioral story (TTL, advisory pid, cooperative limits) is well covered. Gaps remain on failure semantics when capacity is unavailable and on the two undocumented required string parameters.

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

Parameters3/5

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

Schema coverage is 0%, so the description must compensate. It meaningfully explains `gb` (GB of VRAM), `pid` (advisory), and the TTL expiry concept, but leaves the required `owner` and `purpose` parameters entirely undefined and never states TTL units or bounds.

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 verb (Reserve) and resource (GB of VRAM), and immediately draws the boundary against the sibling `claim` by clarifying this is capacity, not a named model. An agent can distinguish `reserve` from `claim`/`warm`/`ensure_free` without opening any schema.

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

Usage Guidelines5/5

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

Gives an explicit use case (non-Ollama GPU work such as a training run or diffusion job) and implies the exclusion (use `claim` for named-model work). It also names what it gates (`warm()`) and states the boundary case where it is powerless (direct Ollama /api/generate auto-load).

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