Skip to main content
Glama

login

Authenticate to access Rover pet services, enabling pet sitter searches, booking management, and profile handling through secure email and password verification.

Instructions

Log in to Rover with your email and password. Required before most operations.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
emailYesYour Rover account email address
passwordYesYour Rover account password

Implementation Reference

  • Handler for the 'login' tool - validates input using LoginSchema, calls browser.login() method, and returns success/failure message based on session state
    case "login": {
      const { email, password } = LoginSchema.parse(args);
      const session = await browser.login(email, password);
      return {
        content: [
          {
            type: "text",
            text: session.isLoggedIn
              ? `Successfully logged in as ${session.email}.`
              : "Login failed. Please check your credentials.",
          },
        ],
      };
    }
  • Zod validation schema for login inputs - validates email format and requires non-empty password
    const LoginSchema = z.object({
      email: z.string().email(),
      password: z.string().min(1),
    });
  • Type definition for RoverSession interface returned by login - contains isLoggedIn boolean and optional userId/email fields
    export interface RoverSession {
      isLoggedIn: boolean;
      userId?: string;
      email?: string;
    }
  • src/index.ts:25-36 (registration)
    Tool registration defining 'login' with name, description, and JSON Schema input schema for MCP protocol
    {
      name: "login",
      description: "Log in to Rover with your email and password. Required before most operations.",
      inputSchema: {
        type: "object",
        properties: {
          email: { type: "string", description: "Your Rover account email address" },
          password: { type: "string", description: "Your Rover account password" },
        },
        required: ["email", "password"],
      },
    },
  • Browser automation helper that navigates to login page, fills credentials, submits form, and verifies successful login by checking URL changes
    async login(email: string, password: string): Promise<RoverSession> {
      const page = this.ensurePage();
      await page.goto(`${this.BASE_URL}/login/`);
      await page.waitForLoadState("networkidle");
    
      await page.fill('input[name="email"], input[type="email"]', email);
      await page.fill('input[name="password"], input[type="password"]', password);
      await page.click('button[type="submit"], input[type="submit"]');
      await page.waitForLoadState("networkidle");
    
      const url = page.url();
      const loggedIn =
        !url.includes("/login") &&
        !url.includes("/signin") &&
        (url.includes("/dashboard") ||
          url.includes("/account") ||
          url === `${this.BASE_URL}/` ||
          !url.includes("login"));
    
      this.session = {
        isLoggedIn: loggedIn,
        email: loggedIn ? email : undefined,
      };
    
      return this.session;
    }

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/markswendsen-code/mcp-rover'

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