Skip to main content
Glama

disconnect_mcp_server_connection

DestructiveIdempotent

Ends a user's active session on a Portkey-managed MCP server without revoking future access; use access update instead to remove permissions permanently.

Instructions

Disconnect one user's active session from a Portkey-managed MCP server. This immediately ends that connection but does not revoke future access; use update_mcp_server_user_access when access itself should be removed. Provide user_id with service keys (user keys derive it), and workspace_id with organisation admin keys. Inspect list_mcp_server_connections first when the target is uncertain.

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": {
      "id": "<id>"
    },
    "name": "disconnect_mcp_server_connection"
  }
}

Input Schema

NameRequiredDescriptionDefault
idYesMCP server ID or slug containing the active connection
user_idNoUser UUID to disconnect; required with service keys and derived from user keys when omitted
workspace_idNoWorkspace ID or slug; required with an organisation admin API key

Output Schema

NameRequiredDescriptionDefault
okYesWhether the tool call succeeded and returned structured data
dataNoStructured success payload when ok is true
errorNoStructured error payload when ok is false

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changedv1.0.9
    • changedInput schema / $schema
      Previous value: -"http://json-schema.org/draft-07/schema#"New value: +"https://json-schema.org/draft/2020-12/schema"
    • changedOutput schema / $schema
      Previous value: -"http://json-schema.org/draft-07/schema#"New value: +"https://json-schema.org/draft/2020-12/schema"
  2. Added

TDQS

A4.3/5.0
Behavior4/5

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

Annotations already declare destructiveHint=true, idempotentHint=true and openWorldHint=true, so the safety profile is covered. The description adds the crucial non-obvious semantic that disconnecting "immediately ends that connection but does not revoke future access" — the distinction between terminating a session and revoking a permission. It stops short of describing failure behavior (e.g. what happens if no active connection exists).

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?

Three sentences, front-loaded with the action and its effect, then the alternative, then prerequisites. The parameter sentence overlaps with the schema, so not every sentence earns full independent value, but there is no filler.

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?

An output schema exists, so return values need no explanation, and the auth-model nuance plus the sibling routing make the definition callable without opening the schema. Minor gap: no statement about what happens when the target has no active connection.

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 coverage is 100% and the schema descriptions already state that user_id is 'required with service keys and derived from user keys when omitted' and workspace_id is 'required with an organisation admin API key'. The description's parameter sentence largely restates this, adding only a condensed pairing rule. Baseline 3 is appropriate.

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 ("Disconnect one user's active session from a Portkey-managed MCP server") with the scope narrowed to a single user's session. It explicitly separates itself from update_mcp_server_user_access (access removal) and list_mcp_server_connections (lookup), so an agent can pick it out of a large sibling set.

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?

Gives both a when-not ("use update_mcp_server_user_access when access itself should be removed") and a precondition ("Inspect list_mcp_server_connections first when the target is uncertain"). It also states which identifier to supply per key type, closing the loop on how to invoke it.

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

Deploy Server

Other Tools