Skip to main content
Glama

unload

Evict a single Ollama model from VRAM immediately to free GPU memory for loading another. Blocks if the model is busy unless force is enabled.

Instructions

Evict a single model from VRAM now (Ollama keep_alive=0).

Refuses by default if model has an active claim or a best-effort busy signal — pass force=True to override (busy is windowed and can lag a few seconds past a generation). by records who requested the eviction in the audit log (see history).

Input Schema

NameRequiredDescriptionDefault
byNounknown
forceNo
modelYes

Output Schema

NameRequiredDescriptionDefault
okYes
busyYes
modelYes
scopeYes
claimsYes
detailYes
reasonYes
free_mbYes
outcomeYes
refusedYes
summaryYes
residentYes
protectedYes
keep_aliveYes
operationsYes
headroom_mbYes
reserved_mbYes
retry_afterYes
retry_countYes
observationsYes
operation_idYes
reservationsYes
additional_mbYes
model_size_mbYes
pending_untilYes
size_verifiedYes
coordination_warningYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv0.3.1
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "$defs": {
      +    "ClaimEntry": {
      +      "properties": {
      +        "claim_id": {
      +          "anyOf": [
      +            {
      +              "type": "string"
      +            },
      +            {
      +              "type": "null"
      +            }
      +          ],
      +          "title": "Claim Id"
      +        },
      +        "claimed_at": {
      +          "anyOf": [
      +            {
      +              "type": "string"
      +            },
      +            {
      +              "type": "null"
      +            }
      +          ],
      +          "title": "Claimed At"
      +        },
      +        "expires_at": {
      +          "anyOf": [
      +            {
      +              "type": "string"
      +            },
      +            {
      +              "type": "null"
      +            }
      +          ],
      +          "title": "Expires At"
      +        },
      +        "gb": {
      +          "anyOf": [
      +            {
      +              "type": "number"
      +            },
      +            {
      +              "type": "null"
      +            }
      +          ],
      +          "title": "Gb"
      +        },
      +        "kind": {
      +          "enum": [
      +            "model",
      +            "reservation"
      +          ],
      +          "title": "Kind",
      +          "type": "string"
      +        },
      +        "model": {
      +          "anyOf": [
      +            {
      +              "type": "string"
      +            },
      +            {
      +              "type": "null"
      +            }
      +          ],
      +          "title": "Model"
      +        },
      +        "owner": {
      +          "anyOf": [
      +            {
      +              "type": "string"
      +            },
      +            {
      +              "type": "null"
      +            }
      +          ],
      +          "title": "Owner"
      +        },
      +        "pid": {
      +          "anyOf": [
      +            {
      +              "type": "integer"
      +            },
      +            {
      +              "type": "null"
      +            }
      +          ],
      +          "title": "Pid"
      +        },
      +        "purpose": {
      +          "anyOf": [
      +            {
      +              "type": "string"
      +            },
      +            {
      +              "type": "null"
      +            }
      +          ],
      +          "title": "Purpose"
      +        },
      +        "renewed_at": {
      +          "anyOf": [
      +            {
      +              "type": "string"
      +            },
      +            {
      +              "type": "null"
      +            }
      +          ],
      +          "title": "Renewed At"
      +        },
      +        "ttl_seconds": {
      +          "anyOf": [
      +            {
      +              "type": "integer"
      +            },
      +            {
      +              "type": "null"
      +            }
      +          ],
      +          "title": "Ttl Seconds"
      +        }
      +      },
      +      "required": [
      +        "claim_id",
      +        "kind",
      +        "model",
      +        "gb",
      +        "pid",
      +        "owner",
      +        "purpose",
      +        "claimed_at",
      +        "renewed_at",
      +        "ttl_seconds",
      +        "expires_at"
      +      ],
      +      "title": "ClaimEntry",
      +      "type": "object"
      +    },
      +    "OperationEntry": {
      +      "properties": {
      +        "expires_at": {
      +          "title": "Expires At",
      +          "type": "string"
      +        },
      +        "kind": {
      +          "title": "Kind",
      +          "type": "string"
      +        },
      +        "lease_expired": {
      +          "title": "Lease Expired",
      +          "type": "boolean"
      +        },
      +        "lifecycle": {
      +          "enum": [
      +            "in_flight",
      +            "unknown",
      +            "unrecognized"
      +          ],
      +          "title": "Lifecycle",
      +          "type": "string"
      +        },
      +        "model": {
      +          "title": "Model",
      +          "type": "string"
      +        },
      +        "operation_id": {
      +          "title": "Operation Id",
      +          "type": "string"
      +        },
      +        "outcome": {
      +          "anyOf": [
      +            {
      +              "const": "unknown",
      +              "type": "string"
      +            },
      +            {
      +              "type": "null"
      +            }
      +          ],
      +          "title": "Outcome"
      +        },
      +        "owner_live": {
      +          "title": "Owner Live",
      +          "type": "boolean"
      +        },
      +        "pending_until": {
      +          "title": "Pending Until",
      +          "type": "string"
      +        },
      +        "reason": {
      +          "anyOf": [
      +            {
      +              "type": "string"
      +            },
      +            {
      +              "type": "null"
      +            }
      +          ],
      +          "title": "Reason"
      +        },
      +        "retry_after": {
      +          "anyOf": [
      +            {
      +              "type": "string"
      +            },
      +            {
      +              "type": "null"
      +            }
      +          ],
      +          "title": "Retry After"
      +        },
      +        "retry_count": {
      +          "title": "Retry Count",
      +          "type": "integer"
      +        },
      +        "scope": {
      +          "title": "Scope",
      +          "type": "string"
      +        },
      +        "started_at": {
      +          "title": "Started At",
      +          "type": "string"
      +        }
      +      },
      +      "required": [
      +        "operation_id",
      +        "model",
      +        "kind",
      +        "scope",
      +        "started_at",
      +        "expires_at",
      +        "pending_until",
      +        "lifecycle",
      +        "owner_live",
      +        "lease_expired",
      +        "outcome",
      +        "reason",
      +        "retry_count",
      +        "retry_after"
      +      ],
      +      "title": "OperationEntry",
      +      "type": "object"
      +    }
      +  },
      +  "properties": {
      +    "additional_mb": {
      +      "anyOf": [
      +        {
      +          "type": "integer"
      +        },
      +        {
      +          "type": "null"
      +        }
      +      ],
      +      "title": "Additional Mb"
      +    },
      +    "busy": {
      +      "anyOf": [
      +        {
      +          "type": "boolean"
      +        },
      +        {
      +          "type": "null"
      +        }
      +      ],
      +      "title": "Busy"
      +    },
      +    "claims": {
      +      "anyOf": [
      +        {
      +          "items": {
      +            "$ref": "#/$defs/ClaimEntry"
      +          },
      +          "type": "array"
      +        },
      +        {
      +          "type": "null"
      +        }
      +      ],
      +      "title": "Claims"
      +    },
      +    "coordination_warning": {
      +      "anyOf": [
      +        {
      +          "type": "string"
      +        },
      +        {
      +          "type": "null"
      +        }
      +      ],
      +      "title": "Coordination Warning"
      +    },
      +    "detail": {
      +      "anyOf": [
      +        {
      +          "type": "string"
      +        },
      +        {
      +          "type": "null"
      +        }
      +      ],
      +      "title": "Detail"
      +    },
      +    "free_mb": {
      +      "anyOf": [
      +        {
      +          "type": "integer"
      +        },
      +        {
      +          "type": "null"
      +        }
      +      ],
      +      "title": "Free Mb"
      +    },
      +    "headroom_mb": {
      +      "anyOf": [
      +        {
      +          "type": "integer"
      +        },
      +        {
      +          "type": "null"
      +        }
      +      ],
      +      "title": "Headroom Mb"
      +    },
      +    "keep_alive": {
      +      "anyOf": [
      +        {
      +          "type": "string"
      +        },
      +        {
      +          "type": "null"
      +        }
      +      ],
      +      "title": "Keep Alive"
      +    },
      +    "model": {
      +      "anyOf": [
      +        {
      +          "type": "string"
      +        },
      +        {
      +          "type": "null"
      +        }
      +      ],
      +      "title": "Model"
      +    },
      +    "model_size_mb": {
      +      "anyOf": [
      +        {
      +          "type": "integer"
      +        },
      +        {
      +          "type": "null"
      +        }
      +      ],
      +      "title": "Model Size Mb"
      +    },
      +    "observations": {
      +      "anyOf": [
      +        {
      +          "additionalProperties": true,
      +          "type": "object"
      +        },
      +        {
      +          "type": "null"
      +        }
      +      ],
      +      "title": "Observations"
      +    },
      +    "ok": {
      +      "title": "Ok",
      +      "type": "boolean"
      +    },
      +    "operation_id": {
      +      "anyOf": [
      +        {
      +          "type": "string"
      +        },
      +        {
      +          "type": "null"
      +        }
      +      ],
      +      "title": "Operation Id"
      +    },
      +    "operations": {
      +      "anyOf": [
      +        {
      +          "items": {
      +            "$ref": "#/$defs/OperationEntry"
      +          },
      +          "type": "array"
      +        },
      +        {
      +          "type": "null"
      +        }
      +      ],
      +      "title": "Operations"
      +    },
      +    "outcome": {
      +      "enum": [
      +        "succeeded",
      +        "refused",
      +        "failed",
      +        "unknown"
      +      ],
      +      "title": "Outcome",
      +      "type": "string"
      +    },
      +    "pending_until": {
      +      "anyOf": [
      +        {
      +          "type": "string"
      +        },
      +        {
      +          "type": "null"
      +        }
      +      ],
      +      "title": "Pending Until"
      +    },
      +    "protected": {
      +      "anyOf": [
      +        {
      +          "type": "boolean"
      +        },
      +        {
      +          "type": "null"
      +        }
      +      ],
      +      "title": "Protected"
      +    },
      +    "reason": {
      +      "anyOf": [
      +        {
      +          "type": "string"
      +        },
      +        {
      +          "type": "null"
      +        }
      +      ],
      +      "title": "Reason"
      +    },
      +    "refused": {
      +      "anyOf": [
      +        {
      +          "type": "boolean"
      +        },
      +        {
      +          "type": "null"
      +        }
      +      ],
      +      "title": "Refused"
      +    },
      +    "reservations": {
      +      "anyOf": [
      +        {
      +          "items": {
      +            "$ref": "#/$defs/ClaimEntry"
      +          },
      +          "type": "array"
      +        },
      +        {
      +          "type": "null"
      +        }
      +      ],
      +      "title": "Reservations"
      +    },
      +    "reserved_mb": {
      +      "anyOf": [
      +        {
      +          "type": "integer"
      +        },
      +        {
      +          "type": "null"
      +        }
      +      ],
      +      "title": "Reserved Mb"
      +    },
      +    "resident": {
      +      "anyOf": [
      +        {
      +          "type": "boolean"
      +        },
      +        {
      +          "type": "null"
      +        }
      +      ],
      +      "title": "Resident"
      +    },
      +    "retry_after": {
      +      "anyOf": [
      +        {
      +          "type": "string"
      +        },
      +        {
      +          "type": "null"
      +        }
      +      ],
      +      "title": "Retry After"
      +    },
      +    "retry_count": {
      +      "title": "Retry Count",
      +      "type": "integer"
      +    },
      +    "scope": {
      +      "anyOf": [
      +        {
      +          "type": "string"
      +        },
      +        {
      +          "type": "null"
      +        }
      +      ],
      +      "title": "Scope"
      +    },
      +    "size_verified": {
      +      "anyOf": [
      +        {
      +          "type": "boolean"
      +        },
      +        {
      +          "type": "null"
      +        }
      +      ],
      +      "title": "Size Verified"
      +    },
      +    "summary": {
      +      "title": "Summary",
      +      "type": "string"
      +    }
      +  },
      +  "required": [
      +    "ok",
      +    "outcome",
      +    "model",
      +    "reason",
      +    "detail",
      +    "summary",
      +    "operation_id",
      +    "pending_until",
      +    "retry_after",
      +    "retry_count",
      +    "keep_alive",
      +    "resident",
      +    "protected",
      +    "busy",
      +    "claims",
      +    "operations",
      +    "observations",
      +    "reservations",
      +    "refused",
      +    "size_verified",
      +    "model_size_mb",
      +    "headroom_mb",
      +    "reserved_mb",
      +    "additional_mb",
      +    "scope",
      +    "free_mb",
      +    "coordination_warning"
      +  ],
      +  "title": "ResidencyResult",
      +  "type": "object"
      +}
  2. First observedv0.2.0

TDQS

A4.1/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 load and does so well: refusal-by-default semantics, the force override, the caveat that the busy signal is windowed and can lag a few seconds past a generation, and audit attribution via 'by'. It stops short of stating the consequence of forcing past an in-flight generation (interrupted work), failure behavior, or any permission requirements.

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?

Three tight sentences, front-loaded with the action, then the guard condition, then the audit side effect. No filler, no restatement of the tool name.

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 description covers the risky behavior an agent needs before calling. It is nearly complete; only the post-force outcome and error-vs-no-op behavior are left implicit.

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 0%, so the description has to compensate, and it explains both non-obvious parameters: 'force' overrides the refusal guard and 'by' is recorded for audit. 'model' is left uncharacterized (name vs. tag vs. ID), which is the only real gap.

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 uses a specific verb and scope: 'Evict a single model from VRAM now', with the mechanism (Ollama keep_alive=0) named explicitly. This clearly separates it from warm/claim/reserve and from any bulk-freeing sibling, though it never names the alternative for multi-model freeing.

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?

It gives an explicit when-not: the call refuses if the model has an active claim or a recent busy signal, and states the escape hatch (force=True). What it lacks is routing advice against named siblings such as release/ensure_free when the caller's real goal is freeing capacity rather than terminating a specific model.

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