Skip to main content
Glama
appleton

Eufy RoboVac MCP Server

by appleton

robovac_connect_discovered

Connect to a discovered Eufy RoboVac device using its IP address, device ID, and local key to enable control through the MCP server.

Instructions

Connect to a discovered RoboVac device by IP (requires device ID and local key)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
ipYesIP address of the discovered device
deviceIdYesThe device ID of your Eufy RoboVac
localKeyYesThe local key for your Eufy RoboVac

Implementation Reference

  • Executes the robovac_connect_discovered tool: connects to RoboVac using provided IP or auto-discovers IP if connection fails, initializes the device via initializeRoboVac.
    case "robovac_connect_discovered":
      // Auto-discover best IP if not provided or if connection fails
      let targetIP = args?.ip as string;
      let discoveredSuccess = false;
    
      if (targetIP) {
        discoveredSuccess = await this.initializeRoboVac(
          args?.deviceId as string,
          args?.localKey as string,
          targetIP
        );
      }
    
      if (!discoveredSuccess) {
        console.error(
          "[DEBUG] Initial connection failed or no IP provided, trying auto-discovery..."
        );
        const discoveredIP = await this.discoverBestRoboVacIP();
    
        if (discoveredIP) {
          targetIP = discoveredIP;
          discoveredSuccess = await this.initializeRoboVac(
            args?.deviceId as string,
            args?.localKey as string,
            targetIP
          );
        }
      }
    
      return {
        content: [
          {
            type: "text",
            text: discoveredSuccess
              ? `Successfully connected to RoboVac at ${targetIP}!`
              : `Failed to connect to device. ${
                  targetIP ? `Tried ${targetIP} but` : ""
                } Check your device ID and local key, and ensure the RoboVac is on the same network.`,
          },
        ],
        isError: !discoveredSuccess,
      };
  • src/server.ts:297-319 (registration)
    Registers the robovac_connect_discovered tool in the listTools handler, defining its name, description, and input schema.
    {
      name: "robovac_connect_discovered",
      description:
        "Connect to a discovered RoboVac device by IP (requires device ID and local key)",
      inputSchema: {
        type: "object",
        properties: {
          ip: {
            type: "string",
            description: "IP address of the discovered device",
          },
          deviceId: {
            type: "string",
            description: "The device ID of your Eufy RoboVac",
          },
          localKey: {
            type: "string",
            description: "The local key for your Eufy RoboVac",
          },
        },
        required: ["ip", "deviceId", "localKey"],
      },
    },
  • Helper method called by the handler to create and connect the RoboVac instance.
    private async initializeRoboVac(
      deviceId: string,
      localKey: string,
      ip?: string
    ): Promise<boolean> {
      try {
        this.robovac = new RoboVac({
          deviceId: deviceId,
          localKey: localKey,
          ip: ip || "192.168.1.100",
        });
        await this.robovac.connect();
        return true;
      } catch (error) {
        console.error("Failed to initialize RoboVac:", error);
        return false;
      }
  • Helper method for auto-discovering the best IP address for the RoboVac, used as fallback in the handler.
    private async discoverBestRoboVacIP(): Promise<string | null> {
      try {
        console.error("[DEBUG] Auto-discovering RoboVac devices...");
        const devices = await this.networkDiscovery.discoverDevices();
    
        if (devices.length === 0) {
          console.error("[DEBUG] No devices found during auto-discovery");
          return null;
        }
    
        // Filter for likely RoboVac devices
        const likelyRoboVacs = devices.filter((device) => device.isLikelyRoboVac);
    
        if (likelyRoboVacs.length > 0) {
          const bestDevice = likelyRoboVacs[0]; // Take the first likely device
          console.error(
            `[DEBUG] Found likely RoboVac at ${bestDevice.ip} (MAC: ${bestDevice.mac}, Vendor: ${bestDevice.vendor})`
          );
          return bestDevice.ip;
        }
    
        // If no likely RoboVacs, try devices with port 6668 open
        const devicesWithPort6668 = devices.filter((device) =>
          device.ports.includes(6668)
        );
    
        if (devicesWithPort6668.length > 0) {
          const potentialDevice = devicesWithPort6668[0];
          console.error(
            `[DEBUG] Found potential RoboVac at ${potentialDevice.ip} with port 6668 open`
          );
          return potentialDevice.ip;
        }
    
        console.error("[DEBUG] No suitable RoboVac candidates found");
        return null;
      } catch (error) {
        console.error(
          `[DEBUG] Auto-discovery failed: ${(error as Error).message}`
        );
        return null;
      }
Behavior2/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It implies a connection action but lacks details on what 'connect' entails—e.g., whether it establishes a persistent session, requires authentication, has side effects like network changes, or handles errors. This leaves significant gaps in understanding the tool's behavior beyond basic parameter requirements.

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, straightforward sentence that efficiently conveys the core action and prerequisites without unnecessary words. It's front-loaded with the main purpose, though it could be slightly more structured by separating usage notes, but overall it's concise and to the point.

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 the complexity of a connection tool with no annotations and no output schema, the description is insufficient. It doesn't explain what happens after connection (e.g., returns a session token, updates device state), potential errors, or how it integrates with other tools like 'robovac_find_robot'. For a tool that likely involves network operations and authentication, more context is needed to ensure safe and effective use.

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%, meaning the input schema already documents all parameters (ip, deviceId, localKey) with clear descriptions. The description adds minimal value by restating that these are required ('requires device ID and local key') but doesn't provide additional context like format examples or usage tips, so it meets the baseline for high schema coverage without enhancing parameter understanding.

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 ('Connect to a discovered RoboVac device') and specifies the target resource ('by IP'), making the purpose evident. However, it doesn't explicitly differentiate from sibling tools like 'robovac_connect' or 'robovac_auto_initialize', which might have overlapping or related functionality, leaving some ambiguity about when to choose this specific tool.

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 minimal guidance by mentioning 'requires device ID and local key', which hints at prerequisites but doesn't clarify when to use this tool versus alternatives like 'robovac_connect' or 'robovac_auto_initialize'. There's no explicit context on when this is appropriate, such as after device discovery, nor any exclusions or comparisons to sibling tools.

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

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/appleton/sam'

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