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);

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