Skip to main content
Glama

disconnect

Safely close the active MCP server connection and clear all connection state and statistics. This tool handles disconnection even when no connection exists, returning details about the operation.

Instructions

Close the current MCP server connection.

Safely disconnects from the active MCP server and clears all connection state and statistics. This method is safe to call even if no connection exists.

Returns: Dictionary with disconnection details including: - success: Always True - message: Human-readable status message - was_connected: Whether a connection existed before disconnect - metadata: Request timing information and previous connection info

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Behavior4/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It effectively describes what the tool does ('clears all connection state and statistics'), safety characteristics ('safe to call even if no connection exists'), and return format. It doesn't mention rate limits or authentication needs, but those may not be relevant for this type of tool.

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 well-structured and front-loaded with the core purpose. Every sentence adds value: the first states what it does, the second explains safety characteristics, and the third details the return format. There's no wasted text.

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

Completeness5/5

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

Given the tool's simplicity (0 parameters, no annotations, but has output schema), the description is complete. It explains what the tool does, its safety characteristics, and the return format. The output schema exists, so the description doesn't need to explain return values in detail beyond what's already provided.

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

Parameters4/5

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

The tool has 0 parameters with 100% schema description coverage, so the baseline is 4. The description appropriately doesn't discuss parameters since none exist, which is correct for this case.

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?

The description clearly states the specific action ('Close the current MCP server connection') and resource ('MCP server'), distinguishing it from siblings like 'connect_to_server' and 'get_connection_status'. It precisely defines what the tool does without being tautological.

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?

The description provides clear context for when to use this tool ('Safely disconnects from the active MCP server') and mentions it's 'safe to call even if no connection exists', which helps differentiate from potential alternatives. However, it doesn't explicitly state when NOT to use it or name specific sibling alternatives.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/rdwj/mcp-test-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server