Skip to main content
Glama

bridge_cancel_session

DestructiveIdempotent

Cancel an active or running task session and terminate its subprocess group by session ID. Use it to stop work that is no longer needed and release the associated processes.

Instructions

Cancel an active or running task session and terminate its subprocess group.

Args: session_id: Session ID to cancel.

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": "bridge_cancel_session"
  }
}

Input Schema

NameRequiredDescriptionDefault
session_idYes

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.0.1

TDQS

B3.2/5.0
Behavior3/5

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

Annotations already declare destructiveHint=true, idempotentHint=true and readOnlyHint=false, so the safety profile is provided structurally. The description adds real value with 'terminate its subprocess group', telling the agent the blast radius extends to child processes, but omits whether in-flight work is lost, whether the session record survives, and how errors/missing sessions are surfaced.

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?

The core sentence is front-loaded and the whole entry is two lines, so it is easy to scan. The 'Args: session_id: Session ID to cancel.' block is essentially padding that repeats the schema without adding meaning.

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?

An output schema exists, so return values need not be described, and the tool is simple with one required string. Still, for a destructive cancellation tool the description never covers post-condition state (is the session removed or just stopped?) or idempotent-rerun behavior, which is the main thing an agent would need before calling it.

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

Parameters2/5

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

Schema description coverage is 0% for the single parameter, so the description must compensate and it effectively does not: 'Session ID to cancel' restates the property name with no format, source, or example of where a valid ID is obtained.

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 verb and resource ('Cancel an active or running task session') plus the concrete side effect of terminating the subprocess group. It does not distinguish itself from the obvious sibling 'bridge_close_session', so an agent cannot tell from the text alone which one applies to its situation.

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

Usage Guidelines3/5

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

'active or running task session' implies a precondition (the session must currently be alive), which is usable guidance. However there is no explicit when-to-use vs 'bridge_close_session', no statement about what happens for already-finished sessions, and no alternatives named.

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