Skip to main content
Glama

manage_network_lock

Control Tailscale network lock operations to manage key authority, enabling or disabling security features, and adding or removing authorized keys via the MCP server.

Instructions

Manage Tailscale network lock (key authority) for enhanced security

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
keyIdNoKey ID for remove operations
operationYesNetwork lock operation to perform
publicKeyNoPublic key for add/remove operations

Implementation Reference

  • The handler function that implements the logic for the manage_network_lock tool. It handles network lock operations (status, enable, disable) by calling Tailscale API methods and returns success or error responses.
    async function manageNetworkLock(
      args: z.infer<typeof NetworkLockSchema>,
      context: ToolContext,
    ): Promise<CallToolResult> {
      try {
        logger.debug("Managing network lock:", args);
    
        switch (args.operation) {
          case "status": {
            const result = await context.api.getNetworkLockStatus();
            if (!result.success) {
              return returnToolError(result.error);
            }
    
            const status = result.data;
            return returnToolSuccess(
              `Network Lock Status:
      - Enabled: ${status?.enabled ? "Yes" : "No"}
      - Node Key: ${status?.nodeKey || "Not available"}
      - Trusted Keys: ${status?.trustedKeys?.length || 0}`,
            );
          }
    
          case "enable": {
            const result = await context.api.enableNetworkLock();
            if (!result.success) {
              return returnToolError(result.error);
            }
    
            return returnToolSuccess(
              `Network lock enabled successfully. Key: ${
                result.data?.key || "Generated"
              }`,
            );
          }
    
          case "disable": {
            const result = await context.api.disableNetworkLock();
            if (!result.success) {
              return returnToolError(result.error);
            }
    
            return returnToolSuccess("Network lock disabled successfully");
          }
    
          default:
            return returnToolError(
              "Invalid network lock operation. Use: status, enable, disable, add_key, remove_key, or list_keys",
            );
        }
      } catch (error) {
        logger.error("Error managing network lock:", error);
        return returnToolError(error);
      }
    }
  • Zod input schema defining the parameters for the manage_network_lock tool, including operation type and optional keys.
    const NetworkLockSchema = z.object({
      operation: z
        .enum(["status", "enable", "disable", "add_key", "remove_key", "list_keys"])
        .describe("Network lock operation to perform"),
      publicKey: z
        .string()
        .optional()
        .describe("Public key for add/remove operations"),
      keyId: z.string().optional().describe("Key ID for remove operations"),
    });
  • Registration of the manage_network_lock tool within the aclTools ToolModule, specifying name, description, inputSchema, and handler.
    {
      name: "manage_network_lock",
      description:
        "Manage Tailscale network lock (key authority) for enhanced security",
      inputSchema: NetworkLockSchema,
      handler: manageNetworkLock,
    },
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 'manage' implies mutation capabilities, the description doesn't specify which operations require special permissions, whether changes are reversible, what the tool returns, or any rate limits. The mention of 'enhanced security' hints at authorization needs but lacks concrete details about behavioral traits.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence that gets straight to the point. It's appropriately sized for a tool with 3 parameters and no output schema. There's no wasted language, though it could potentially benefit from slightly more detail given the complete lack of annotations.

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

Completeness3/5

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

For a tool with 3 parameters, 100% schema coverage, but no annotations and no output schema, the description is minimally adequate. It identifies the domain (network lock/key authority) and purpose (enhanced security), but doesn't provide enough context about what the tool returns or the implications of different operations. Given the security-sensitive nature implied by 'key authority', more completeness would be beneficial.

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?

With 100% schema description coverage, the baseline is 3. The description adds value by clarifying that this manages 'network lock (key authority)', which provides context about what the parameters control beyond what the schema descriptions say. This helps the agent understand that keyId and publicKey parameters relate to key authority management, not just generic operations.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose3/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description states the tool manages Tailscale network lock for enhanced security, which provides a general purpose (verb+resource). However, it's somewhat vague about what 'manage' entails and doesn't clearly differentiate from sibling tools like manage_keys or manage_acl that also handle security-related operations. The description lacks specificity about the key authority aspect mentioned in parentheses.

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. With multiple 'manage_' sibling tools (manage_acl, manage_keys, manage_device_tags, etc.), there's no indication of when network lock operations are appropriate versus other security or management tools. No context about prerequisites, timing, or exclusions is provided.

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