Skip to main content
Glama

Cancel Sage Session

cancel_sage_session
DestructiveIdempotent

Cancel a running Sage computation and restart the worker to stop stuck or long-running calculations. Resets the session state for a fresh start.

Instructions

Cancel any running Sage computation and restart the worker

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
sessionNoWorkspace to use, as a name or a portable handle. Workspaces have independent variables. A name is scoped to this MCP session; a handle returned by start_sage_session (workspace_token) reaches the same workspace across reconnects and is a bearer credential -- keep it secret. Omit for 'default'.default

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
messageNoSession cleared

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv0.7.0
    • changedInput schema / properties / session / description
      Previous value: -"Named workspace to use. Workspaces have independent variables; omit for 'default'."New value: +"Workspace to use, as a name or a portable handle. Workspaces have independent variables. A name is scoped to this MCP session; a handle returned by start_sage_session (workspace_token) reaches the same workspace across reconnects and is a bearer credential -- keep it secret. Omit for 'default'."
  2. Changed1 schema field changedv0.5.0
    • addedInput schema / properties / session
      Added value: +{
      +  "default": "default",
      +  "description": "Named workspace to use. Workspaces have independent variables; omit for 'default'.",
      +  "type": "string"
      +}
  3. First observedv0.3.1

TDQS

A3.5/5.0
Behavior4/5

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

Annotations already declare destructiveHint=true and idempotentHint=true, and the description adds concrete behavioral context by revealing that the worker is restarted and that running computations are canceled. This goes beyond the structured hints and gives an agent a clear picture of the main side effect, though it does not enumerate all state loss implications.

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?

The description is a single, direct sentence with no filler or repetition. It front-loads the primary action and states the key side effect efficiently, which is ideal for an agent scanning tool definitions.

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

Completeness3/5

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

With only one optional parameter and a rich schema plus output schema present, the core call is well covered. However, the description leaves ambiguous whether cancellation is scoped to the supplied session or applies globally to the worker, and it does not clarify how this relates to the sibling session-control tools. This is a meaningful gap for a destructive operation.

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?

The input schema has 100% coverage and provides a rich explanation of the optional 'session' parameter, including scoping and bearer-credential warnings. The description itself adds no parameter-level meaning, but the schema already carries that burden, so the baseline score of 3 is appropriate.

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 names a specific action ('Cancel any running Sage computation') and a concrete side effect ('restart the worker'), so it is not a tautology and clearly identifies this as a cancellation/restart tool. It does not explicitly differentiate itself from the sibling interrupt_sage_session or reset_sage_session, but the 'restart the worker' phrase gives a useful distinguishing hook.

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

Usage Guidelines2/5

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

No guidance is given about when to prefer this tool over interrupt_sage_session, stop_sage_session, or reset_sage_session. The description implies a heavier operation by mentioning worker restart, but it never states the conditions or exclusions an agent should use to route to the correct sibling.

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