Skip to main content
Glama
Local AI MCP

Local AI MCP

Official
by TMHSDigital

Load model

load_model
Idempotent

Load a model into memory on a selected local provider to prepare it for inference, with optional keep-alive and context length controls.

Instructions

Load a model into memory on ONE provider so it is ready for inference. Optional keepAlive (e.g. '5m', '1h') and contextLength. Without provider, uses the live local provider that has the model.

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": "load_model"
  }
}

Input Schema

NameRequiredDescriptionDefault
modelYesModel id/name to load
providerNoProvider instance name. Omit to let the server choose (local providers only, unless LOCAL_AI_ALLOW_HOSTED_FALLBACK is set).
keepAliveNoHow long to keep the model resident, e.g. '5m'
contextLengthNoContext window to load with (Ollama num_ctx, LM Studio --context-length)

Output Schema

NameRequiredDescriptionDefault
loadYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed5 schema fields changedv0.5.0
    • removedInput schema / additionalProperties
      Removed value: -false
    • addedInput schema / properties / contextLength
      Added value: +{
      +  "description": "Context window to load with (Ollama num_ctx, LM Studio --context-length)",
      +  "exclusiveMinimum": 0,
      +  "maximum": 9007199254740991,
      +  "type": "integer"
      +}
    • changedInput schema / properties / provider / description
      Previous value: -"Optional provider id"New value: +"Provider instance name. Omit to let the server choose (local providers only, unless LOCAL_AI_ALLOW_HOSTED_FALLBACK is set)."
    • changedInput schema / properties / provider / enum
      Previous value: -[
      -  "ollama",
      -  "lmstudio",
      -  "moonshot",
      -  "openaicompat",
      -  "llamacpp"
      -]New value: +[
      +  "ollama",
      +  "lmstudio",
      +  "llamacpp",
      +  "dockermodelrunner"
      +]
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "$schema": "http://json-schema.org/draft-07/schema#",
      +  "additionalProperties": false,
      +  "properties": {
      +    "load": {
      +      "additionalProperties": {},
      +      "propertyNames": {
      +        "type": "string"
      +      },
      +      "type": "object"
      +    }
      +  },
      +  "required": [
      +    "load"
      +  ],
      +  "type": "object"
      +}
  2. First observedv0.4.0

TDQS

A3.7/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=false, idempotentHint=true, destructiveHint=false and openWorldHint=false, so the safety profile is covered structurally. The description adds some context — the fallback to the 'live local provider that has the model' and residency via keepAlive — but does not say what happens if no local provider has the model (error vs. implicit download), nor that loading reserves memory and may evict existing residency. That omission matters for a non-destructive but resource-consuming mutation.

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 short sentences, front-loaded with the action and outcome, then optional parameters, then the default-provider rule. There is no filler and every clause carries information the agent needs before calling.

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 and annotations carry the safety profile, so the description needn't explain return values; what it does cover is targeted and sufficient for a 4-parameter tool. It falls short of 5 because the failure mode when the model is absent locally — the most likely error path given the sibling `ensure_model`/`pull_model` tools — is unaddressed.

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 100%, so a baseline of 3 applies, and the description does add meaning beyond the schema by explaining the operational consequence of omitting `provider` ('uses the live local provider that has the model') rather than just 'let the server choose'. The keepAlive and contextLength mentions largely restate the schema, so it stops short of a 5.

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 ('Load a model into memory') plus the outcome ('ready for inference'), which tells an agent this is a load/warm-up step rather than an inference call. The 'on ONE provider' constraint scopes the operation, but the description never differentiates itself from the closely related sibling `ensure_model` (or `pull_model`), leaving the agent to guess which is appropriate.

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

Usage Guidelines3/5

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

Usage is only implied by the outcome statement and by the default rule 'Without provider, uses the live local provider that has the model.' Nothing tells the agent when to prefer this over `ensure_model`, `pull_model`, or `list_loaded` first, and no preconditions (must the model already exist locally?) are given.

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