Skip to main content
Glama

Stop session

stop_session

Stop a running session with a summary and outcome. 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.

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
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. 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"
  2. First observed

TDQS

A4.5/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=false, destructiveHint=false, idempotentHint=false, openWorldHint=false. The description nonetheless adds real behavioral context: the timer keeps running for other sessions, the merge semantics for duplicate queued stops (earliest end wins, done wins, first summary kept), and the applied: ended|shortened|recorded return signal. This goes beyond the annotations.

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?

Purpose and the session_id scoping rule are front-loaded, and every clause carries information. It is dense with long run-on sentences about offline merge ordering, but the content is substantive rather than 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 mutation tool with 6 params and no output schema, the description covers the required inputs, the optional queued-delivery inputs, side effects on linked plan items, conflict/merge behavior, and the shape of the response. An agent has what it needs to call it correctly.

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

Parameters5/5

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

With schema coverage at 67%, the description meaningfully compensates: it explains that session_id comes from get_now and is required with op_id/end_at, that op_id and end_at are for offline-queued apps and should be omitted by interactive agents, and that outcome=done completes the linked plan item or path step — none of which the schema conveys.

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 ('Stop a running session') and immediately scopes it with the summary/outcome inputs. It differentiates itself from siblings by naming edit_session as the tool to use for an already-ended session and by carving out its behavior against stop_timer/delete_session.

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?

Explicit when-to-use: pass session_id from get_now, otherwise only this connection's session. Explicit when-not and alternative: 'without end_at or op_id it refuses a session that already ended: use edit_session for that.' It also says when each of end_at/op_id applies (queued offline apps).

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.