LM Studio: start a background task
task_startRun a prompt on a local model in the background and get a task_id immediately. Include files, images, or a session_id, then check progress with task_status.
Instructions
Run a prompt, with optional text files and images, on a local model in the background and return a task_id at once. Pass session_id to continue a session, or model (plus optional session settings) to start a new session for the task. Follow it with task_status; stop it with task_cancel.
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": {
"prompt": "<prompt>"
},
"name": "task_start"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| files | No | Absolute paths to text files (code, logs, documents) to add to the message, up to 2 MB each. Use this instead of pasting file contents. | |
| model | No | Model for a new session, when session_id is not given. | |
| title | No | Name for the new session. Default: the start of the prompt. | |
| images | No | Absolute paths to PNG, JPEG, WebP or GIF files, for vision models. | |
| prompt | Yes | What the local model should do. | |
| reload | No | If the model is loaded with a smaller context than needed, unload it and load it again. | |
| reasoning | No | Reasoning effort, for models that support it. | |
| session_id | No | Run the task inside this session. | |
| temperature | No | 0 is deterministic. | |
| integrations | No | LM Studio plugins or MCP servers the local model may use, as configured in LM Studio, e.g. "mcp/github". | |
| system_prompt | No | System instructions. | |
| context_length | No | Context the new session needs. Default: the model's saved default. Leave it out unless the user asks for a specific context: a saved default is the user's choice for this model. | |
| max_output_tokens | No | Upper limit for generated tokens per answer. |