Skip to main content
Glama

channels_connect_session_cancel

Stop a connect session that is still waiting. Returns the session with cancelled.

Only a waiting session is cancelled. On a session that is already connected this does nothing (cancelled: false, status stays connected): it never disconnects a number.

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

Input Schema

NameRequiredDescriptionDefault
session_idYesThe session_id that channels.connect_session.start returned.
in_workspaceNoRun this one call in this workspace id instead of the session's. Nothing is stored; other sessions are not affected.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.4/5.0
Behavior5/5

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

Goes well beyond the annotations by disclosing the state-machine behavior: only waiting sessions are cancelled, connected sessions return `cancelled: false` with status unchanged, and it never disconnects a number. This is consistent with destructiveHint=false and tells the agent the call is effectively a safe no-op in the wrong state.

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?

Two short sentences, front-loaded with the action and result, then the guardrail condition. Every clause carries information; nothing is 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 simple two-parameter cancel tool with no output schema and non-destructive annotations, the definition covers purpose, state conditions, and return field adequately. The remaining gap is error behavior for an unknown or expired session_id, which the description does not address.

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?

Schema description coverage is 100%, with `session_id` tied to the start tool's return and `in_workspace` explained as a per-call, non-persisted override. The description adds nothing about parameters, so the baseline 3 applies.

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 (stop/cancel) and resource (connect session) with an explicit precondition: 'a connect session that is still waiting.' The scope clause cleanly separates it from start/get/submit siblings because it only acts on waiting sessions, and it names the returned field (`cancelled`).

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 clear when-to-use (session still waiting) and when-not (already connected – no-op) guidance, which is exactly the decision an agent needs. It stops short of naming an alternative tool for actually disconnecting a number, so the agent knows what not to use this for but not what to use instead.

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.