Skip to main content
Glama

load_model

Load a model into memory for inference. Specify the model key and optional settings like context length or flash attention.

Instructions

Load a model into memory so it is ready for inference.

If context_length is omitted, the model's configured default is used. Only LLMs loaded via LM Studio's llama.cpp engine honor flash_attention, num_experts, eval_batch_size and offload_kv_cache_to_gpu.

Examples: load_model(model_key="qwen/qwen3-4b-2507") load_model(model_key="openai/gpt-oss-20b", context_length=16384, flash_attention=True)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
model_keyYes
num_expertsNo
context_lengthNo
eval_batch_sizeNo
flash_attentionNo
offload_kv_cache_to_gpuNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Behavior4/5

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

With no annotations provided, the description carries full burden. It explains that the tool loads a model into memory, describes default context_length behavior, and notes engine-specific parameter constraints. It does not mention potential side effects like unloading previous models, but the core behavior is transparent.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is concise and front-loaded with the purpose. It uses bullet points for engine-specific notes and includes illustrative examples. No superfluous information, though the engine-specific detail could be slightly more streamlined.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given 6 parameters and 0% schema coverage, the description covers main behavior and key constraints but omits the output schema (exists but not described) and prerequisites like model availability. It is adequate but not fully comprehensive.

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 0%, so the description must compensate. It explains context_length default and engine-specific parameters (flash_attention, num_experts, etc.) but does not clarify the format of model_key beyond examples. The examples help, but the param semantics could be more explicit.

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?

The description clearly states the tool's purpose: 'Load a model into memory so it is ready for inference.' It uses a specific verb ('load') and resource ('model'), and is easily distinguishable from sibling tools like unload_model and list_models.

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?

The description provides clear guidance on when to use the tool (to prepare a model for inference) and includes examples. It also specifies engine-specific parameter applicability, but lacks explicit 'when not to use' or alternatives, which is acceptable given the tool's straightforward nature.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/dam2452/llmstudio-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server