Skip to main content
Glama
TMHSDigital

Local AI MCP

Official
by TMHSDigital

Ensure model is ready

ensure_model
Idempotent

Prepare a local model in one call: optionally pull it, check VRAM fit, evict models as needed, load, and verify. Use dryRun to preview the plan without changes.

Instructions

Make a model ready in one call: optionally pull it, check it fits current free VRAM, unload other models if needed (evict: 'lru' or 'all'), load it, and verify. Use dryRun:true to get the plan without changing anything.

Input Schema

NameRequiredDescriptionDefault
evictNoUnload other models to make room: none (default), lru (least recently used first), all
modelYesModel id/name
dryRunNoReturn the plan only (default false)
providerNoProvider instance name. Omit to let the server choose (local providers only, unless LOCAL_AI_ALLOW_HOSTED_FALLBACK is set).
allowPullNoDownload the model if it is not installed (default false)
keepAliveNoKeep-alive for the loaded model, e.g. '30m'
kvCacheTypeNoKV cache precision used for the fit estimate (default f16)
contextLengthNoContext window to fit and load with (default 4096)

Output Schema

NameRequiredDescriptionDefault
fitNo
planYes
modelYes
readyYes
providerYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.5.0

TDQS

A4/5.0
Behavior3/5

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

Annotations already declare destructiveHint=false, idempotentHint=true, and openWorldHint=true. The description adds one genuinely useful detail beyond them: the evict option unloads other models as a side effect on shared VRAM. It does not explain failure behavior, whether the call blocks until the model is loaded, or how keepAlive/contextLength affect the loaded state, so the added context is real but thin.

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?

A single front-loaded sentence that walks the workflow in execution order and ends with the dry-run escape hatch. No filler, and the composite nature is conveyed before any parameter detail.

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 all eight parameters are covered by the schema. What remains missing is a note on whether the operation blocks until the model is verified loaded and what happens when the model cannot fit even after eviction.

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 every one of the eight parameters is already documented, including the evict enum which is richer than the description's 'lru' or 'all' (the schema also documents 'none'). The description only re-explains dryRun and evict; it says nothing about provider, contextLength, kvCacheType, keepAlive, or allowPull, so it adds no meaning beyond the schema.

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 ('ensure') plus the resource ('model') and then enumerates the composite workflow it performs: pull, VRAM fit check, eviction, load, verify. That enumeration distinguishes it cleanly from the atomic siblings (pull_model, fit_check, load_model) it orchestrates.

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?

'Make a model ready in one call' signals this is the composite alternative to chaining the single-step siblings, and 'Use dryRun:true to get the plan without changing anything' gives a concrete safe-preview path. It never explicitly says when to prefer load_model or pull_model directly, so the routing is implied rather than stated.

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