Skip to main content
Glama

LM Studio: estimate memory

estimate_load
Read-only

Estimates model memory requirements before loading so you can avoid out-of-memory issues when selecting large models or adjusting context length.

Instructions

Estimate the memory a model needs before loading it (lms load --estimate-only; nothing is loaded). Use it before loading large models.

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": {
      "model": "<model>"
    },
    "name": "estimate_load"
  }
}

Input Schema

NameRequiredDescriptionDefault
gpuNoGPU offload: "off", "max" or a ratio such as "0.5".
modelYesModel key from list_models.
context_lengthNoContext length to estimate for. Default: the model's saved default. Leave it out unless the user asks for a specific context: a saved default is the user's choice for this model.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv0.3.2
    • changedInput schema / properties / context_length / description
      Previous value: -"Context length to estimate for. Default: the model's saved default."New value: +"Context length to estimate for. Default: the model's saved default. Leave it out unless the user asks for a specific context: a saved default is the user's choice for this model."
  2. First observedv0.1.0

TDQS

A4.2/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true and openWorldHint=false; the description reinforces this with "nothing is loaded" and cites the underlying CLI mode (--estimate-only), which tells the agent no state changes or side effects occur. It does not describe what the estimate contains (VRAM vs RAM breakdown), which is the only notable 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 compact sentences, front-loaded with the core action and followed by a usage cue. Zero filler; the parenthetical CLI reference earns its place by pinning down the semantics.

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 read-only, three-parameter tool with full schema coverage and clear annotations and no output schema, this is nearly complete. Only the shape of the returned estimate is left implicit, a minor omission given the low complexity.

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 description coverage is 100%, so all three parameters, including the GPU ratio format and the context_length default policy, are already documented in the schema. The description adds no parameter meaning beyond that, which is the expected baseline when the schema does the work.

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 and resource ("estimate the memory a model needs") and immediately clarifies scope with "before loading it... nothing is loaded". That clause alone separates it from load_model, so an agent can pick correctly without reading schemas.

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?

"Use it before loading large models" gives a clear trigger condition tied to the sibling load_model workflow. It lacks an explicit exclusion (e.g., don't call it for already-loaded models or as a substitute for load_model), so it stops short of the top band.

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