Skip to main content
Glama

get_version

Retrieve Tailscale version details using the standardized Model Context Protocol interface to support automated network management and monitoring tasks.

Instructions

Get Tailscale version information

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The handler function for the 'get_version' tool. It invokes the unified Tailscale client's getVersion method and formats the result as a success response.
    async function getVersion( _args: Record<string, unknown>, context: ToolContext, ): Promise<CallToolResult> { try { logger.debug("Getting Tailscale version"); // Use unified client - this operation is CLI-only const result = await context.client.getVersion(); if (!result.success) { return returnToolError(result.error); } return returnToolSuccess( `Tailscale version information:\n\n${result.data}`, ); } catch (error: unknown) { logger.error("Error getting version:", error); return returnToolError(error); } }
  • The registration of the 'get_version' tool within the networkTools module, including empty input schema and reference to the handler.
    { name: "get_version", description: "Get Tailscale version information", inputSchema: z.object({}), handler: getVersion, },
  • Supporting method in UnifiedTailscaleClient that delegates to either Tailscale API or CLI to retrieve version information, used by the tool handler.
    async getVersion(): Promise< UnifiedResponse<string | { version: string; apiVersion: string }> > { if (this.shouldUseAPI("getVersion")) { const response = await this.api.getVersion(); return this.normalizeAPIResponse(response); } if (!this.cliAvailable) { return { success: false, error: "Version information is not available", source: "cli", }; } const response = await this.cli.version(); return this.normalizeCLIResponse(response); }
  • Tailscale API client method for fetching version information via HTTP GET to /api/v2/version, called by unified client if API preferred.
    async getDevice( deviceId: string, ): Promise<TailscaleAPIResponse<TailscaleDevice>> { try { const response = await this.client.get(`/device/${deviceId}`); const device = TailscaleDeviceSchema.parse(response.data); return this.handleResponse({ ...response, data: device }); } catch (error) {

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