Skip to main content
Glama

update_pet_profile

Modify pet profile details including size, temperament, special needs, and health information to maintain accurate care records on Rover.

Instructions

Update an existing pet's profile details such as size, temperament, and special needs.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
petIdYesThe pet's ID on Rover
nameNoUpdated pet name
breedNoUpdated breed
ageNoUpdated age in years
weightNoUpdated weight in pounds
sizeNoUpdated size category
temperamentNoUpdated temperament description
specialNeedsNoUpdated special needs or care notes
vaccinatedNoUpdated vaccination status
spayedNeuteredNoUpdated spayed/neutered status

Implementation Reference

  • The updatePetProfile async method implements the core tool logic using Playwright browser automation. It navigates to the pet edit page, fills in updated name and special needs fields, and submits the form, returning a success boolean.
    async updatePetProfile(
      petId: string,
      updates: Partial<Pet>
    ): Promise<{ success: boolean }> {
      if (!this.session.isLoggedIn) {
        throw new Error("You must be logged in to update a pet profile.");
      }
      const page = this.ensurePage();
      await page.goto(`${this.BASE_URL}/account/pets/${petId}/edit/`);
      await page.waitForLoadState("networkidle");
    
      if (updates.name) {
        const nameInput = page.locator('input[name="name"]').first();
        if (await nameInput.isVisible()) await nameInput.fill(updates.name);
      }
    
      if (updates.specialNeeds) {
        const needsInput = page.locator('textarea[name*="special"], textarea[name*="needs"]').first();
        if (await needsInput.isVisible()) await needsInput.fill(updates.specialNeeds);
      }
    
      const submitBtn = page.locator('button[type="submit"]').first();
      if (await submitBtn.isVisible()) {
        await submitBtn.click();
        await page.waitForLoadState("networkidle");
        return { success: true };
      }
    
      return { success: false };
    }
  • UpdatePetSchema defines the Zod validation schema for tool inputs. It validates petId as required string, and optional fields including name, breed, age, weight, size (enum), temperament, specialNeeds, vaccinated, and spayedNeutered.
    const UpdatePetSchema = z.object({
      petId: z.string().min(1),
      name: z.string().optional(),
      breed: z.string().optional(),
      age: z.number().optional(),
      weight: z.number().optional(),
      size: z.enum(["small", "medium", "large", "giant"]).optional(),
      temperament: z.string().optional(),
      specialNeeds: z.string().optional(),
      vaccinated: z.boolean().optional(),
      spayedNeutered: z.boolean().optional(),
    });
  • src/index.ts:222-246 (registration)
    Tool registration defines 'update_pet_profile' with description and JSON Schema inputSchema. Specifies petId as required, and all other pet properties as optional with type definitions and descriptions.
    {
      name: "update_pet_profile",
      description:
        "Update an existing pet's profile details such as size, temperament, and special needs.",
      inputSchema: {
        type: "object",
        properties: {
          petId: { type: "string", description: "The pet's ID on Rover" },
          name: { type: "string", description: "Updated pet name" },
          breed: { type: "string", description: "Updated breed" },
          age: { type: "number", description: "Updated age in years" },
          weight: { type: "number", description: "Updated weight in pounds" },
          size: {
            type: "string",
            enum: ["small", "medium", "large", "giant"],
            description: "Updated size category",
          },
          temperament: { type: "string", description: "Updated temperament description" },
          specialNeeds: { type: "string", description: "Updated special needs or care notes" },
          vaccinated: { type: "boolean", description: "Updated vaccination status" },
          spayedNeutered: { type: "boolean", description: "Updated spayed/neutered status" },
        },
        required: ["petId"],
      },
    },
  • The switch case handler for 'update_pet_profile' tool calls. Parses input arguments with UpdatePetSchema, extracts petId and updates, invokes browser.updatePetProfile(), and returns formatted success/failure response.
    case "update_pet_profile": {
      const { petId, ...updates } = UpdatePetSchema.parse(args);
      const result = await browser.updatePetProfile(petId, updates);
      return {
        content: [
          {
            type: "text",
            text: result.success
              ? `Pet profile ${petId} updated successfully!`
              : "Failed to update pet profile. Please try again.",
          },
        ],
      };
    }
  • The Pet TypeScript interface defines the data structure for pet objects with properties: id, name, species, and optional breed, age, weight, size, temperament, specialNeeds, vaccinated, spayedNeutered, and profilePhotoUrl.
    export interface Pet {
      id: string;
      name: string;
      species: "dog" | "cat" | "other";
      breed?: string;
      age?: number;
      weight?: number;
      size?: "small" | "medium" | "large" | "giant";
      temperament?: string;
      specialNeeds?: string;
      vaccinated?: boolean;
      spayedNeutered?: boolean;
      profilePhotoUrl?: string;
    }
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. While 'Update' implies a mutation operation, the description doesn't disclose important behavioral traits like what permissions are required, whether changes are reversible, what happens to unspecified fields, error conditions, or rate limits. It mentions what can be updated but not the behavioral implications of the update operation.

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, well-structured sentence that efficiently communicates the tool's purpose with zero wasted words. It's appropriately sized for a tool with comprehensive schema documentation and gets straight to the point without unnecessary elaboration.

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?

For a mutation tool with 10 parameters, no annotations, and no output schema, the description is insufficient. It doesn't address important contextual aspects like authentication requirements, error handling, what the tool returns, or how partial updates work. The description covers basic purpose but leaves critical operational details unspecified.

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?

The description mentions specific parameters (size, temperament, special needs) that align with the input schema, but with 100% schema description coverage, the schema already documents all 10 parameters thoroughly. The description adds minimal value beyond what's in the schema - it provides examples but no additional semantic context about parameter usage, constraints, or relationships.

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 ('Update') and resource ('pet's profile details') with specific examples of fields that can be updated (size, temperament, special needs). It distinguishes this from 'add_pet_profile' which would create a new profile rather than update an existing one. However, it doesn't explicitly mention that this updates an existing pet profile versus other types of updates in the system.

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 like 'add_pet_profile' for creating new profiles or other tools for related operations. There's no mention of prerequisites, constraints, or typical usage scenarios beyond the basic purpose statement.

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

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