subforge-mcp
v1.3.1MCP server for local LM Studio models
These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.
list_models List LM Studio models
List models loaded into memory in the local LM Studio server, with their type: llm/vlm (chat, delegate_task), embedding (rank_by_similarity) or decision (decide, ask_decision, eval_decisions). Set include_unloaded to also see downloaded models load_model can load.
| Parameter | Type | Description |
|---|---|---|
include_unloaded | boolean | Also list downloaded models that are not loaded yet |
chat Chat with local LM Studio model
Send a message to a local model running in LM Studio. Maintains conversation history per session_id across calls; call reset_chat to clear it.
| Parameter | Type | Description |
|---|---|---|
message * | string | User message to send |
model * | string | Model id, e.g. from list_models |
max_tokens | integer | |
session_id | string | Conversation id to keep history separate across topics |
system_prompt | string | System prompt; only applied when starting a new session |
temperature | number |
load_model Load a model into LM Studio memory
Explicitly load a downloaded-but-not-yet-loaded model (llm, embedding or decision) into LM Studio memory. Requires user consent via MCP elicitation before loading — this is the only tool in this server that can bring a new model into memory. Refuses if the connected client does not support elicitation, or if the user declines.
| Parameter | Type | Description |
|---|---|---|
model * | string | Model id/key to load, e.g. a modelKey or path from a downloaded models listing |
ttl_seconds | integer | Idle time-to-live in seconds; LM Studio auto-unloads the model after this much inactivity |
unload_model Unload a model from LM Studio memory
Explicitly unload a currently-loaded model from LM Studio memory. This is the counterpart to load_model. Unlike load_model, this does NOT require user consent via MCP elicitation: unloading only frees RAM/VRAM and is safely reversible (load it again any time), so it isn't gated behind a confirmation prompt. Returns a plain informative result (not an error) if the requested model isn't currently loaded.
| Parameter | Type | Description |
|---|---|---|
model * | string | Model to unload — matched against a currently-loaded model's identifier, modelKey, or path (e.g. the identifier returned by load_model or list_models). |
reset_chat Reset chat session
Clear the conversation history for a session_id (or all sessions).
| Parameter | Type | Description |
|---|---|---|
session_id | string | Session to clear; omit to clear all sessions |
rank_by_similarity Rank texts by semantic similarity
Embed a query and a list of documents with a loaded LM Studio embedding model and return the documents ranked by cosine similarity to the query (score, original index, preview). Vectors stay inside this server; only the ranking enters the conversation.
| Parameter | Type | Description |
|---|---|---|
documents * | array | Candidate texts; results refer to them by their index in this array |
model * | string | Loaded embedding model id (see list_models) |
query * | string | Text to compare every document against |
top_k | integer | How many results to return (10) |
decide Pick between options with a local decision model
Ask a loaded LM Studio decision model which of 2-6 options best accomplishes a task given some context. Returns the chosen option id, its probability, the model's confidence and the full ranking. Describe options neutrally — the wording is the whole input. Never throws: on any failure it returns ok:false with an error code and probability 0, so treat probability as the gate for acting on the answer.
| Parameter | Type | Description |
|---|---|---|
options * | array | 2-6 options, each {id, description} |
task * | string | What needs to be decided, in one or two sentences |
context | string | Constraints and product context that should drive the choice |
model | string | Decision model id; defaults to the only loaded decision model. Find one with list_models (include_unloaded) and load it with load_model. |
ask_decision Ask a decision model raw typed questions
Send typed questions about one state straight to a loaded LM Studio decision model (POST /v1/systemone) and get the raw answers with probabilities. Use it to prototype a question before relying on it. Types: choice (criteria = {option: description|null}), score (criteria = 2-10 ordered levels, lowest first) and noul (yes/no; optional criteria {true, false}). Question ids are not shown to the model, so put the meaning in instructions. Never throws: failures come back as ok:false with an error code.
| Parameter | Type | Description |
|---|---|---|
questions * | object | Map of your question id to a question |
state * | Content to judge: a string, or JSON with named parts | |
model | string | Decision model id; defaults to the only loaded decision model. Find one with list_models (include_unloaded) and load it with load_model. |
eval_decisions Measure a decision model against labeled cases
Run every case in a labeled .jsonl file through a loaded LM Studio decision model and report overall accuracy, accuracy per probability band (0.5-0.6, 0.6-0.7, ...) and the lowest probability threshold whose auto-decisions reach target_accuracy. Each line is either a decide case {id?, task, context?, options: [{id, description}], label: <option id>} or a raw question case {id?, state, question, label}. Use it to set the threshold for acting on decide without asking a human.
| Parameter | Type | Description |
|---|---|---|
path * | string | Absolute path to the .jsonl dataset (max 5MB) |
current_threshold | number | Threshold in use today, to compare against the suggestion |
min_support | integer | Minimum cases above a threshold before it can be suggested (5) |
model | string | Decision model id; defaults to the only loaded decision model. Find one with list_models (include_unloaded) and load it with load_model. |
target_accuracy | number | Accuracy auto-decisions must reach (0.9) |
delegate_task Delegate a mechanical coding task to a local model
Delegate a small, mechanical, multi-step coding task (a variable rename, a boring find/replace, a boilerplate first-draft) to a local model in LM Studio. The local model runs its own read/list/edit-file loop directly against the filesystem, scoped to `dir` — file contents and the back-and-forth never enter this conversation, only the final summary does, so this saves context on rote work. Pass only a plain-language `task`, never file contents. Do NOT use this for anything requiring nuanced judgment, understanding relationships across many files, awareness of the current conversation, or high…
| Parameter | Type | Description |
|---|---|---|
dir * | string | Absolute path to the directory the local model's file tools are scoped to. All read_file/list_dir/edit_file calls that would resolve outside this directory are refused. |
model * | string | LM Studio model id (from list_models); must already be loaded. |
task * | string | Plain-language instruction for the local model, e.g. 'rename variable foo to bar in utils.ts'. Do not include file contents — the model reads files itself via its own tools. |
max_turns | integer | Cap on agentic-loop iterations before returning a best-effort summary. |
think | boolean | Best-effort hint to disable the model's reasoning/thinking output for simple tasks (set false for speed). Not guaranteed — LM Studio's Jinja prompt template is the reliable control for this; see REA… |