LM Studio: send to a session
session_sendSend a message in a model session, optionally attach text files or images, and wait for the reply while checking context usage; use task_start for long jobs.
Instructions
Send a message in a session, with optional text files and images, and wait for the answer. Reports how full the context is. For long jobs use task_start instead.
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": {
"session_id": "<session_id>",
"message": "<message>"
},
"name": "session_send"
}
}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. | |
| images | No | Absolute paths to PNG, JPEG, WebP or GIF files, for vision models. | |
| reload | No | If the model is loaded with a smaller context than needed, unload it and load it again. | |
| message | Yes | The message to send. | |
| session_id | Yes | Session id from session_start or session_get. | |
| include_reasoning | No | Also return the model's reasoning text. | |
| max_output_tokens | No | Upper limit for generated tokens per answer. |