Skip to main content
Glama

disconnect_network

Terminates active connection to the Tailscale network using a standardized command, enabling automated network disconnection through the Tailscale MCP Server.

Instructions

Disconnect from the Tailscale network

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The primary handler function for the 'disconnect_network' tool. It invokes context.client.disconnect() to disconnect from the Tailscale network, logs the action, and returns a success or error result.
    async function disconnectNetwork(
      _args: Record<string, unknown>,
      context: ToolContext,
    ): Promise<CallToolResult> {
      try {
        logger.debug("Disconnecting from Tailscale network");
    
        // Use unified client - this operation is CLI-only
        const result = await context.client.disconnect();
    
        if (!result.success) {
          return returnToolError(result.error);
        }
    
        return returnToolSuccess(
          `Successfully disconnected from Tailscale network\n\n${result.data}`,
        );
      } catch (error: unknown) {
        logger.error("Error disconnecting from network:", error);
        return returnToolError(error);
      }
    }
  • Local registration of the 'disconnect_network' tool within the networkTools ToolModule export. Defines the tool name, description, empty input schema (no parameters), and references the handler function.
    {
      name: "disconnect_network",
      description: "Disconnect from the Tailscale network",
      inputSchema: z.object({}),
      handler: disconnectNetwork,
    },
  • Import of the networkTools module (containing disconnect_network tool) into the central ToolRegistry.
    import { networkTools } from "./network-tools.js";
  • Top-level registration of the networkTools module in the ToolRegistry's loadTools() method, which registers all tools including 'disconnect_network'.
    this.registerModule(deviceTools);
    this.registerModule(networkTools);
    this.registerModule(aclTools);
    this.registerModule(adminTools);
Behavior2/5

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

With no annotations provided, the description carries full burden for behavioral disclosure. While 'Disconnect from' implies a state-changing operation, it doesn't specify whether this requires authentication, affects other devices, is reversible, or has any side effects. This is inadequate for a tool that likely changes network connectivity.

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 a single, clear sentence with zero wasted words. It's appropriately sized for a simple tool with no parameters and gets straight to the point without unnecessary elaboration.

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

Completeness2/5

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

Given this is a network disconnection tool with no annotations and no output schema, the description is insufficient. It doesn't explain what happens after disconnection, whether there are confirmation steps, what the expected outcome is, or how this differs from other network management operations among the many sibling tools.

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 schema already fully documents the lack of parameters. The description appropriately doesn't discuss parameters, maintaining focus on the tool's purpose. Baseline for 0 parameters is 4.

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?

The description clearly states the action ('Disconnect from') and resource ('the Tailscale network'), providing a specific verb+resource combination. However, it doesn't differentiate from sibling tools like 'connect_network' beyond the obvious opposite action, which prevents a perfect score.

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

Usage Guidelines2/5

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

The description provides no guidance on when to use this tool versus alternatives. It doesn't mention prerequisites, consequences, or when it might be appropriate versus other network management tools like 'manage_network_lock' or 'device_action'.

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

Related 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/HexSleeves/tailscale-mcp'

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