Skip to main content
Glama

gateway.disconnect_server

Disconnect a running downstream MCP server without altering persistent configuration; by default it refuses if requests are pending, while force=true cancels them before disconnecting.

Instructions

Disconnect a running downstream MCP server without changing persistent config. Refuses by default when that server has pending requests; set force=true to cancel them.

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": {
      "server_name": "<server_name>"
    },
    "name": "gateway.disconnect_server"
  }
}

Input Schema

NameRequiredDescriptionDefault
forceNoCancel this server's pending requests before disconnecting
server_nameYesName of the server to disconnect

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv3.0.1
    • addedInput schema / properties / server_name / minLength
      Added value: +1
  2. Addedv1.21.1
  3. Removedv1.20.0
  4. First observedv1.18.0

TDQS

A4.2/5.0
Behavior4/5

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

With no annotations, the description carries the full burden and does disclose the key behavioral trait: a default refusal on pending requests, plus the explicit consequence of force (cancelling them) and the guarantee that persistent config is untouched. It does not cover error behavior for unknown server names or whether the server can be reconnected afterwards.

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 tight sentences with no filler; the scoping guarantee and the refusal/force behavior are both front-loaded.

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 lifecycle tool with no output schema, the description covers purpose, idempotency-adjacent scoping, and the one dangerous default. Minor gaps remain around failure modes and post-disconnect state.

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%, so both parameters are already documented, and the description's mention of force=true mostly restates the schema. It adds the valuable detail that the default path refuses rather than proceeds, but no format or edge-case syntax.

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 a running downstream MCP server') and immediately scopes it against a nearby sibling by clarifying it does not change persistent config, which separates it from update_server and restart_server.

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 the operative usage condition – it refuses when pending requests exist, so force=true is the escape hatch – which is exactly the decision an agent must make. It stops short of naming alternatives like restart_server for the reconnect case, so it is not a full when/when-not mapping.

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