Skip to main content
Glama

LM Studio: send to a session

session_send

Send 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

NameRequiredDescriptionDefault
filesNoAbsolute paths to text files (code, logs, documents) to add to the message, up to 2 MB each. Use this instead of pasting file contents.
imagesNoAbsolute paths to PNG, JPEG, WebP or GIF files, for vision models.
reloadNoIf the model is loaded with a smaller context than needed, unload it and load it again.
messageYesThe message to send.
session_idYesSession id from session_start or session_get.
include_reasoningNoAlso return the model's reasoning text.
max_output_tokensNoUpper limit for generated tokens per answer.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv0.3.2
    • addedInput schema / properties / files
      Added value: +{
      +  "description": "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.",
      +  "items": {
      +    "type": "string"
      +  },
      +  "type": "array"
      +}
  2. First observedv0.1.0

TDQS

A4/5.0
Behavior3/5

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

Annotations already declare this is a non-read-only, non-destructive, non-idempotent, closed-world call. The description adds useful behavior beyond that: the call blocks until the answer arrives and the response reports context fullness, which explains the long-job caution. It does not describe failure modes or what happens when the context overflows, so it stops at useful-but-incomplete.

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?

Three short sentences, front-loaded with the core action, then a return-value hint, then the escalation path. No filler or restated field names.

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?

No output schema exists, yet the description notes that the answer is returned and context usage is reported, which covers the main return expectation. With annotations covering mutation/idempotency, the only omission is error behavior for an invalid or stale session.

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 coverage is 100%, so every one of the seven parameters is already documented in-schema. The description only summarizes that files and images are optional; it adds no format or size nuance beyond what the schema states. Baseline 3 applies.

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 and resource ("Send a message in a session") plus the payload variants (files, images), and names the sibling it is not (task_start) for long jobs. An agent can distinguish it from task_start/chat without opening a schema.

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?

Explicitly routes long-running work to task_start instead, which is the key when-not rule. It does not state the prerequisite that a session must exist first (only implied by the session_id parameter description), leaving a small gap.

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