Skip to main content
Glama

message_sitter

Send messages to pet sitters on Rover to inquire about services, discuss pet care details, and coordinate bookings through direct communication.

Instructions

Send a message to a sitter on Rover. Requires being logged in.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
sitterIdYesSitter's Rover username/ID or profile URL
messageYesMessage text to send to the sitter

Implementation Reference

  • The core handler implementation that executes the message_sitter tool logic. It navigates to a sitter's profile page, clicks the contact/message button, fills in the message textarea, and submits the message.
    async messageSitter(
      sitterId: string,
      message: string
    ): Promise<{ success: boolean; messageId?: string }> {
      if (!this.session.isLoggedIn) {
        throw new Error("You must be logged in to send messages.");
      }
      const page = this.ensurePage();
      const sitterUrl = sitterId.startsWith("http")
        ? sitterId
        : `${this.BASE_URL}/sitters/${sitterId}/`;
      await page.goto(sitterUrl);
      await page.waitForLoadState("networkidle");
    
      const contactBtn = page.locator(
        'button:has-text("Contact"), button:has-text("Message"), a:has-text("Contact")'
      ).first();
      if (await contactBtn.isVisible()) {
        await contactBtn.click();
        await page.waitForLoadState("networkidle");
      }
    
      const textarea = page.locator("textarea").first();
      if (await textarea.isVisible()) {
        await textarea.fill(message);
        const sendBtn = page.locator('button[type="submit"], button:has-text("Send")').first();
        if (await sendBtn.isVisible()) {
          await sendBtn.click();
          await page.waitForLoadState("networkidle");
          return { success: true };
        }
      }
    
      return { success: false };
    }
  • The switch case handler that routes the message_sitter tool call to the browser.messageSitter() function and formats the response.
    case "message_sitter": {
      const { sitterId, message } = MessageSitterSchema.parse(args);
      const result = await browser.messageSitter(sitterId, message);
      return {
        content: [
          {
            type: "text",
            text: result.success
              ? "Message sent successfully!"
              : "Failed to send message. Please try again.",
          },
        ],
      };
    }
  • Zod schema definition that validates the message_sitter tool input parameters: sitterId (non-empty string) and message (non-empty string).
    const MessageSitterSchema = z.object({
      sitterId: z.string().min(1),
      message: z.string().min(1),
    });
  • src/index.ts:150-165 (registration)
    Tool registration defining the message_sitter tool with its name, description, and JSON Schema input specification for the MCP protocol.
    {
      name: "message_sitter",
      description: "Send a message to a sitter on Rover. Requires being logged in.",
      inputSchema: {
        type: "object",
        properties: {
          sitterId: {
            type: "string",
            description: "Sitter's Rover username/ID or profile URL",
          },
          message: {
            type: "string",
            description: "Message text to send to the sitter",
          },
        },
        required: ["sitterId", "message"],

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