Skip to main content
Glama
appleton

Eufy RoboVac MCP Server

by appleton

robovac_auto_initialize

Automatically discover and initialize the first RoboVac device found using your Eufy account credentials to enable vacuum control.

Instructions

Automatically discover and initialize the first RoboVac device found

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
emailYesYour Eufy account email address
passwordYesYour Eufy account password
deviceIndexNoIndex of device to connect to (0 for first device)

Implementation Reference

  • Handler for the robovac_auto_initialize tool. Discovers RoboVac devices using NetworkDiscovery, selects by deviceIndex, attempts connection with discovered credentials and IP, falls back to local IP discovery if cloud init fails, returns formatted success or error response.
                case "robovac_auto_initialize":
                  try {
                    const devices = await this.networkDiscovery.discoverDevices();
    
                    if (devices.length === 0) {
                      return {
                        content: [
                          {
                            type: "text",
                            text: "No RoboVac devices found.",
                          },
                        ],
                        isError: true,
                      };
                    }
    
                    const deviceIndex = (args?.deviceIndex as number) || 0;
                    if (deviceIndex >= devices.length) {
                      return {
                        content: [
                          {
                            type: "text",
                            text: `Device index ${deviceIndex} is out of range. Found ${devices.length} device(s).`,
                          },
                        ],
                        isError: true,
                      };
                    }
    
                    const selectedDevice = devices[deviceIndex];
                    let autoInitSuccess = await this.initializeRoboVac(
                      selectedDevice.deviceId,
                      selectedDevice.localKey,
                      selectedDevice.ip
                    );
    
                    // If direct connection fails, try auto-discovery
                    if (!autoInitSuccess) {
                      console.error(
                        "[DEBUG] Cloud connection failed, trying auto-discovery..."
                      );
                      const discoveredIP = await this.discoverBestRoboVacIP();
    
                      if (discoveredIP) {
                        autoInitSuccess = await this.initializeRoboVac(
                          selectedDevice.deviceId,
                          selectedDevice.localKey,
                          discoveredIP
                        );
                      }
                    }
    
                    return {
                      content: [
                        {
                          type: "text",
                          text: autoInitSuccess
                            ? `Successfully connected to ${selectedDevice.name}!`
                            : `Failed to connect to ${selectedDevice.name}. Check network connection and ensure the device is online.`,
                        },
                      ],
                      isError: !autoInitSuccess,
                    };
                  } catch (error) {
                    return {
                      content: [
                        {
                          type: "text",
                          text: `Auto-initialization failed: ${
                            (error as Error).message
                          }
    
    ⚠️  The Eufy API appears to have changed since this implementation was created. As an alternative, you can:
    
    1. Use the Eufy app to find your device IP address
    2. Use a network scanner to find devices on your network
    3. Check your router's device list
    4. Use tools like eufy-security-client or other community projects
    
    Once you have the device credentials, you can use the eufy-robovac library directly.`,
                        },
                      ],
                      isError: true,
                    };
                  }
  • Input schema for robovac_auto_initialize: requires Eufy email and password for cloud discovery, optional deviceIndex (default 0). Defines the tool's parameters and validation.
    name: "robovac_auto_initialize",
    description:
      "Automatically discover and initialize the first RoboVac device found",
    inputSchema: {
      type: "object",
      properties: {
        email: {
          type: "string",
          description: "Your Eufy account email address",
        },
        password: {
          type: "string",
          description: "Your Eufy account password",
        },
        deviceIndex: {
          type: "number",
          description:
            "Index of device to connect to (0 for first device)",
          default: 0,
        },
      },
      required: ["email", "password"],
    },
  • src/server.ts:272-296 (registration)
    Registration of the robovac_auto_initialize tool in the static list of tools provided by the ListToolsRequestHandler.
    {
      name: "robovac_auto_initialize",
      description:
        "Automatically discover and initialize the first RoboVac device found",
      inputSchema: {
        type: "object",
        properties: {
          email: {
            type: "string",
            description: "Your Eufy account email address",
          },
          password: {
            type: "string",
            description: "Your Eufy account password",
          },
          deviceIndex: {
            type: "number",
            description:
              "Index of device to connect to (0 for first device)",
            default: 0,
          },
        },
        required: ["email", "password"],
      },
    },
  • Helper method called by the handler to create and connect the RoboVac instance using provided credentials and IP.
    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;
      }
Behavior2/5

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

No annotations are provided, so the description carries the full burden of behavioral disclosure. It mentions 'discover and initialize' but does not clarify what 'initialize' entails (e.g., authentication, configuration, or pairing), potential side effects, or any prerequisites beyond the input parameters. This leaves significant gaps in understanding the tool's behavior.

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 that directly states the tool's purpose without unnecessary words. It is front-loaded with the core action and resource, making it easy to parse and understand 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 the complexity of device initialization and the lack of annotations and output schema, the description is insufficient. It does not explain what 'initialize' means in practice, what happens if no device is found, or what the expected outcome is, leaving critical contextual gaps for the agent.

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 input schema already documents all parameters (email, password, deviceIndex) with clear descriptions. The description adds no additional meaning or context beyond what the schema provides, such as explaining why these parameters are needed or how they affect the discovery process, resulting in a baseline score.

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 ('Automatically discover and initialize') and resource ('first RoboVac device found'), making the purpose evident. However, it does not explicitly differentiate from sibling tools like 'robovac_connect' or 'robovac_connect_discovered', which may have overlapping or related functions, so it falls short of a perfect score.

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, such as whether it should be used for initial setup or in specific scenarios. With multiple sibling tools available, the lack of explicit usage context or exclusions leaves the agent without clear direction.

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