LM Studio Control
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| LMS_CLI_PATH | No | Location of the lms CLI. | ~/.lmstudio/bin/lms |
| LMSTUDIO_BASE_URL | No | Auto-detected by default. Control LM Studio on another machine, e.g. ws://192.168.1.20:1234 | |
| LMSTUDIO_API_TOKEN | No | Only if "Require authentication" is on in LM Studio. | |
| LMSTUDIO_AUTO_WAKE | No | Run `lms daemon up` if LM Studio isn't reachable. | true |
| LMSTUDIO_HTTP_PORT | No | Port checked and used by server start. | 1234 |
Instructions
Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.
Controls the local LM Studio app: HTTP server, models, load settings, inference, downloads and runtimes. Typical flow: lmstudio_status → lmstudio_list_models → lmstudio_optimize_settings (apply=true) → lmstudio_chat. Use lmstudio_hardware before hand-tuning load settings. Sizes are reported in GB (GiB).
Capabilities
Features and capabilities supported by this server
Protocol revision2025-11-25
| Capability | Details |
|---|---|
| tools | {
"listChanged": true
} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| lmstudio_statusB | Overview of LM Studio: app version, whether the OpenAI-compatible HTTP server is running, and which models are loaded right now. |
| lmstudio_hardwareA | Hardware LM Studio sees: GPUs with VRAM, system RAM, CPU and instruction sets, plus the runtime engines and whether each is compatible. Use before tuning load settings. |
| lmstudio_server_startA | Start LM Studio's OpenAI-compatible HTTP server (what other apps and curl talk to). Wakes the LM Studio service first if needed. |
| lmstudio_server_stopA | Stop LM Studio's HTTP server. Loaded models stay loaded; apps using the API will lose their connection. |
| lmstudio_list_modelsA | List models downloaded on this machine, with size, quantization, architecture and maximum context. |
| lmstudio_list_loadedA | List models currently loaded in memory, with their live load settings (context, GPU offload, KV cache, etc.), idle timeout and whether they are busy. |
| lmstudio_load_modelA | Load a downloaded model into memory with explicit settings. Omitted settings use LM Studio's saved defaults for that model. For automatic tuning use lmstudio_optimize_settings instead. |
| lmstudio_unload_modelA | Unload a loaded model (frees its RAM/VRAM), or all loaded models. |
| lmstudio_estimate_memoryA | Ask LM Studio how much VRAM and RAM a model would use with given load settings, without loading it. Shows whether it passes LM Studio's safety guardrails. |
| lmstudio_optimize_settingsA | Find the best load settings for a model on this hardware, using LM Studio's own memory estimator (no guessing). Searches context length, GPU offload and KV-cache precision so the model fits VRAM/RAM with headroom. Goals: balanced (32k context, full GPU if possible), max_context (largest context that fits), max_speed (everything on GPU, 8k context), max_quality (unquantized KV cache). Set apply=true to load it. |
| lmstudio_benchmarkA | Measure real speed of a loaded model: tokens per second, time to first token, prompt size. Runs fixed prompts at temperature 0. Use to compare settings. |
| lmstudio_chatB | Send a chat to a local model and get the reply with speed stats. If the model is not loaded, LM Studio loads it with its saved defaults. |
| lmstudio_embedB | Turn text into embedding vectors with a local embedding model. Returns vectors, or only their dimensions if vectors are not needed. |
| lmstudio_count_tokensA | Count tokens in a text using a loaded model's own tokenizer, and compare with its context length. |
| lmstudio_search_modelsA | Search the LM Studio catalog / Hugging Face for models to download. Shows each file option with size and LM Studio's fit estimate for this machine (full GPU, partial GPU, CPU, or won't fit). |
| lmstudio_download_modelA | Download a model from the catalog in the background. Picks the file LM Studio recommends for this machine unless you name a quantization. Check progress with lmstudio_download_status. |
| lmstudio_download_statusB | Progress of downloads started in this session. Can also cancel one. |
| lmstudio_runtime_enginesB | List installed inference engines (llama.cpp CUDA/Vulkan/CPU, MLX…) and which one is selected per model format, or select a different engine. |
| lmstudio_cliA | Run any |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
No prompts | |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
No resources | |
TDQS
Scored across 19 tools
Most tools target a clearly distinct operation (load vs unload vs estimate vs benchmark vs chat). The only fuzzy pairs are lmstudio_status vs lmstudio_list_loaded (both report what's loaded) and lmstudio_load_model vs lmstudio_optimize_settings, but the descriptions explicitly cross-reference and differentiate them.
All tools share the lmstudio_ prefix and are mostly verb_noun (load_model, list_models, download_status). A few are bare nouns (status, hardware, benchmark, chat, cli) which slightly breaks the verb_noun pattern but stays readable and predictable.
19 tools is on the heavy side but each covers a real facet of the domain: server control, hardware, model catalog/downloads, load/unload lifecycle, memory estimation, optimization, benchmarking, and inference. The lmstudio_cli escape hatch keeps the surface from bloating further.
Load/unload/list/download/search/benchmark/chat/embed plus server lifecycle and runtime engine selection cover the full model-management lifecycle. Minor gaps like deleting a downloaded model or configuring server settings (port, API key) are largely workable around via lmstudio_cli.