Skip to main content
Glama

stop_session

Saves a checkpoint and terminates session compute, draining accepted jobs first. Retry pending saves; use discard_unsaved to stop immediately and lose unsaved edits.

Instructions

Save a checkpoint and terminate compute. Project volume and revisions persist.

Drains accepted jobs before saving; rejects new jobs while draining. A pending
save returns stopped=false and its job ID. Retry after it finishes. Setting
discard_unsaved=true terminates immediately and loses unsaved edits.

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>"
    },
    "name": "stop_session"
  }
}

Input Schema

NameRequiredDescriptionDefault
session_idYes
discard_unsavedNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.4/5.0
Behavior5/5

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

With no annotations present, the description carries the full burden and does so well: it discloses the drain-then-save sequencing, that new jobs are rejected during draining, the asynchronous stopped=false/job-ID return, and that discard_unsaved=true destroys unsaved edits. The data-loss consequence is stated plainly, which is exactly what an agent needs before a mutating call.

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?

Front-loaded with the core action and its persistence guarantee, then escalates to edge cases (draining, pending save, data loss). Five short sentences, each carrying distinct operational information with no filler.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a two-parameter mutating tool with no output schema, this covers what is needed: what happens to durable state, the sequencing against in-flight jobs, and the shape of a non-terminal response. The only omission is auth/permission requirements, which is minor here.

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 0%, so the description must compensate, and it does for the parameter that carries risk: discard_unsaved is explained in terms of both behavior (terminate immediately) and consequence (lose unsaved edits). session_id is left unelaborated, but its meaning is self-evident from the tool name.

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?

States a specific compound action: save a checkpoint and terminate compute, with the persistence guarantee that the project volume and revisions survive. This is clearly distinct from siblings like cancel_job (cancel a job) or save_project (save without terminating), though it never names an alternative explicitly.

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?

Gives concrete operational guidance: a pending save returns stopped=false and a job ID, and the caller should retry after it finishes; discard_unsaved=true is the escape hatch for immediate termination. It does not explicitly contrast with siblings such as cancel_job or save_project, so the choice between them is left implicit.

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