Skip to main content
Glama

Stop session

stop_session

Stop a running session with a summary and outcome, when the user says they are done or finished. Pass session_id from get_now; without it, only this connection's single running session is stopped, never another one. The timer keeps running for other sessions. outcome=done completes the linked plan item or path step. Without end_at or op_id it refuses a session that already ended: use edit_session for that. With end_at (apps delivering a stop queued offline) a second stop on the same session is merged, whatever order they arrive in: the earliest end wins, done wins over any other outcome, the first summary stays and a different later one goes to the notes; the answer says applied: ended | shortened | recorded.

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

Input Schema

NameRequiredDescriptionDefault
op_idNofor apps replaying queued requests: an id the app minted before its first attempt and reuses on retries, so the write is applied once and a retry gets the first answer back. Do not invent one; an agent calling interactively leaves it out
end_atNowhen the work ended as ISO 8601 with offset, e.g. 2026-10-20T14:05:00+02:00. For apps delivering a request queued offline; an agent calling interactively leaves it out. Rejected before the session start; a clock more than 2 minutes ahead of the server is taken as now
outcomeYes
summaryYes
wip_textNoyour own WIP todo text for this work, when the summary would not read well on WIP. Used only on a project marked public and for finished work (a session ending done, or a move); still posted 10 minutes later unless the user cancels
session_idNofrom get_now; required with op_id or end_at
attention_shareNocorrects the share in hindsight

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedInput schema / properties / wip_text / description
      Previous value: -"your own WIP todo text for this work, when the summary would not read well on WIP. Used only on a project marked public; still posted 10 minutes later unless the user cancels"New value: +"your own WIP todo text for this work, when the summary would not read well on WIP. Used only on a project marked public and for finished work (a session ending done, or a move); still posted 10 minutes later unless the user cancels"
  2. Changed1 schema field changed
    • addedInput schema / properties / wip_text
      Added value: +{
      +  "description": "your own WIP todo text for this work, when the summary would not read well on WIP. Used only on a project marked public; still posted 10 minutes later unless the user cancels",
      +  "maxLength": 1000,
      +  "minLength": 1,
      +  "type": "string"
      +}
  3. Changed3 schema fields changed
    • addedInput schema / properties / end_at
      Added value: +{
      +  "description": "when the work ended as ISO 8601 with offset, e.g. 2026-10-20T14:05:00+02:00. For apps delivering a request queued offline; an agent calling interactively leaves it out. Rejected before the session start; a clock more than 2 minutes ahead of the server is taken as now",
      +  "type": "string"
      +}
    • addedInput schema / properties / op_id
      Added value: +{
      +  "description": "for apps replaying queued requests: an id the app minted before its first attempt and reuses on retries, so the write is applied once and a retry gets the first answer back. Do not invent one; an agent calling interactively leaves it out",
      +  "maxLength": 128,
      +  "minLength": 8,
      +  "type": "string"
      +}
    • addedInput schema / properties / session_id / description
      Added value: +"from get_now; required with op_id or end_at"
  4. First observed

TDQS

A4.5/5.0
Behavior4/5

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

With annotations already declaring it a non-read-only, non-destructive mutation, the description goes well beyond them: it states the timer keeps running for other sessions, that sessions already ended are refused, and it spells out merge rules for queued duplicate stops (earliest end wins, done wins, first summary stays, later variant goes to notes). The only gap is that it never mentions the public-WIP posting side effect, which is a real behavioral consequence.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

It is front-loaded with the core action and the default-scope rule, and nearly every clause carries operational weight. The merge-ordering sentence is heavy with semicolons and could be broken for scannability, but the content is justified rather than padded.

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 7-parameter mutation with no output schema, it covers the two highest-risk behaviors (silent reuse of the wrong session, and duplicate offline stops) and even summarizes the response shape ('applied: ended | shortened | recorded'). It stops short of the public WIP text side effect, which the schema documents but the description does not reinforce.

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 71%, so the schema does part of the work, but the description adds genuine meaning the schema lacks: session_id's fallback behavior when absent, outcome=done's downstream effect ('completes the linked plan item or path step'), and the interactive-vs-queued distinction for op_id/end_at. It leaves wip_text and attention_share entirely to the schema.

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?

The opening clause names a concrete verb and resource ('Stop a running session') plus the required payload ('with a summary and outcome'). It actively distinguishes itself from siblings by naming edit_session as the fallback for already-ended sessions, so an agent can route without opening either schema.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

It gives an explicit trigger ('when the user says they are done or finished'), an explicit default when session_id is omitted ('only this connection's single running session is stopped, never another one'), and an explicit alternative ('use edit_session for that'). It also carves out the offline-queue case via end_at/op_id, which is the one scenario where re-stopping is legal.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.