Skip to main content
Glama

LM Studio: sessions

session_get
Read-only

List local model sessions or retrieve a specific session's settings, context usage, summary, and recent turns by passing its session_id.

Instructions

Without session_id: list the sessions with model, turns and context use. With session_id: settings, context use, summary and the latest turns.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "session_get"
  }
}

Input Schema

NameRequiredDescriptionDefault
fullNoShow whole messages instead of the first 1500 characters.
lastNoHow many recent exchanges to show. Default: 10.
session_idNoSession id from session_start or session_get.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.1/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true and openWorldHint=false, so the safety profile is covered. The description adds value beyond that by disclosing what each mode actually returns (model, turns, context use vs. settings, summary, latest turns), which tells the agent what data to expect. It does not address output size limits itself, though the schema's 'full' and 'last' parameters imply them.

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?

Two parallel clauses, each mapped to one invocation mode, with zero filler. The structure is front-loaded so an agent can parse both branches immediately.

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?

For a 3-parameter, no-output-schema read tool with annotations covering safety, the definition covers the essential decision (which mode) and what each mode yields. Minor gaps remain around whether listing results are bounded or ordered, but nothing critical to correct invocation is missing.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so the baseline would be 3. The description exceeds that by explaining that the presence or absence of session_id fundamentally switches the tool's behavior, a semantic fact the schema's terse 'Session id from session_start or session_get' does not convey. The 'full' and 'last' parameters are left entirely to the schema, keeping this from a 5.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description uses a clear verb-and-resource framing ('list the sessions', 'settings, context use, summary and the latest turns') and splits behavior by mode, so an agent knows this is a read/inspection tool rather than a mutation. It is not explicitly contrasted against siblings like session_send or session_compact, but the enumerated return contents make the intended read-only inspection role evident.

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?

The definition gives explicit conditional guidance: omit session_id to enumerate sessions, supply session_id to inspect one. That covers both invocation contexts well. It stops short of naming exclusions or alternative tools for related needs, so it falls short of a 5.

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