Skip to main content
Glama

LM Studio: unload model

unload_model
Idempotent

Unload a loaded model instance to free memory, or unload all loaded models with the all option. Refuses removal while a session request or task is using the model.

Instructions

Unload a loaded model instance to free memory, or every loaded model with all: true. Refuses while a session request or task uses the model.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "unload_model"
  }
}

Input Schema

NameRequiredDescriptionDefault
allNoUnload every loaded model.
instance_idNoInstance id from list_models or server_status.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4/5.0
Behavior4/5

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

Beyond the annotations (non-read-only, idempotent, non-destructive), the description adds the important behavioral fact that the call is refused while a session request or task holds the model — a real failure mode the annotations do not convey. It leaves the exact error/return shape implicit, but no output schema exists so that is a minor gap.

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?

Two sentences, zero filler, with the primary action front-loaded and the batch variant and refusal condition following in priority order.

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?

For a simple two-optional-parameter tool with full annotation coverage, the description covers the action, the batch mode, and the blocking condition. The one unaddressed case is calling with neither parameter set (no instance_id, all absent), whose behavior remains undefined.

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 100%, so both parameters are already documented; baseline 3 applies. The description restates the 'all' semantics ('every loaded model with all: true') rather than adding new meaning, and says nothing about what happens when neither parameter is supplied.

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?

States a specific verb and resource ('Unload a loaded model instance') plus the scope variant ('every loaded model with all: true'), so the agent knows exactly what the tool does. It does not explicitly name or contrast a sibling (e.g., load_model), which keeps it short of a 5.

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?

Gives a clear motivating context ('to free memory') and a hard precondition ('Refuses while a session request or task uses the model'), which tells the agent when the call will fail. It does not explicitly point to an alternative tool or say when not to unload at all.

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