Skip to main content
Glama

manage_file_sharing

Manage file sharing settings on Tailscale devices by enabling, disabling, or retrieving status through automated operations with the MCP server.

Instructions

Manage Tailscale file sharing settings

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
deviceIdNoDevice ID (for device-specific operations)
operationYesFile sharing operation to perform

Implementation Reference

  • The handler function that implements the logic for managing Tailscale file sharing: get status, enable, or disable.
    async function manageFileSharing(
      args: z.infer<typeof FileSharingSchema>,
      context: ToolContext,
    ): Promise<CallToolResult> {
      try {
        logger.debug("Managing file sharing:", args);
    
        switch (args.operation) {
          case "get_status": {
            const result = await context.api.getFileSharingStatus();
            if (!result.success) {
              return returnToolError(result.error);
            }
    
            return returnToolSuccess(
              `File Sharing Status: ${
                result.data?.fileSharing ? "Enabled" : "Disabled"
              }`,
            );
          }
    
          case "enable": {
            const result = await context.api.setFileSharingStatus(true);
            if (!result.success) {
              return returnToolError(result.error);
            }
    
            return returnToolSuccess("File sharing enabled successfully");
          }
    
          case "disable": {
            const result = await context.api.setFileSharingStatus(false);
            if (!result.success) {
              return returnToolError(result.error);
            }
    
            return returnToolSuccess("File sharing disabled successfully");
          }
    
          default:
            return returnToolError(
              "Invalid file sharing operation. Use: get_status, enable, or disable",
            );
        }
      } catch (error) {
        logger.error("Error managing file sharing:", error);
        return returnToolError(error);
      }
    }
  • Zod input schema for the manage_file_sharing tool defining operation and optional deviceId.
    const FileSharingSchema = z.object({
      operation: z
        .enum(["get_status", "enable", "disable"])
        .describe("File sharing operation to perform"),
      deviceId: z
        .string()
        .optional()
        .describe("Device ID (for device-specific operations)"),
    });
  • Tool registration in the adminTools module, specifying name, description, schema, and handler.
    {
      name: "manage_file_sharing",
      description: "Manage Tailscale file sharing settings",
      inputSchema: FileSharingSchema,
      handler: manageFileSharing,
    },
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. 'Manage' implies mutation capabilities, but it doesn't specify permissions required, side effects, or response format. The description fails to explain that operations include getting status, enabling, and disabling (which the schema reveals), leaving the agent unaware of the tool's full behavioral range.

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, efficient sentence with zero wasted words. It's appropriately sized for a tool with only two parameters and clear scope. No unnecessary details or repetition are present, making it easy to parse quickly.

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 no annotations and no output schema, the description is incomplete for a mutation-capable tool. It doesn't cover behavioral aspects like what 'enable' or 'disable' do, error conditions, or return values. For a tool that can change system state, more context is needed to use it safely and effectively.

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

Parameters3/5

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

Schema description coverage is 100%, so the schema fully documents both parameters (deviceId and operation with enum values). The description adds no additional meaning about parameters beyond what's in the schema, such as explaining when deviceId is required or the implications of each operation. This meets the baseline for high schema coverage.

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 'Manage Tailscale file sharing settings' states the general purpose (managing file sharing settings) but lacks specificity about what 'manage' entails. It doesn't distinguish this tool from sibling tools like 'manage_acl' or 'manage_policy_file' that also manage different Tailscale settings. The verb 'manage' is vague compared to more precise alternatives like 'configure' or 'control'.

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. There's no mention of prerequisites, context for file sharing operations, or comparison to sibling tools. The agent must infer usage from the tool name and parameters alone, which is insufficient for clear decision-making.

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