clean_pet
Maintain and refresh your digital companion’s appearance to ensure optimal health and happiness in the MCPet virtual pet experience.
Instructions
Clean your virtual pet
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Input Schema (JSON Schema)
{
"properties": {},
"required": [],
"type": "object"
}
Implementation Reference
- src/index.ts:527-602 (handler)Handler for the 'clean_pet' tool. Checks if pet exists, updates stats, sets cleanliness to 100, adjusts happiness and health based on pet type (cat, dog, other), saves pet data, displays appropriate bath animation and updated stats.case "clean_pet": { if (!pet) { return { content: [ { type: "text", text: "You don't have a pet yet! Use the create_pet tool to create one.", }, ], }; } updatePetStats(); // Cleaning fully restores cleanliness pet.stats.cleanliness = 100; // Get the bath animation const animation = getBathAnimation(pet.type); // But can affect happiness depending on pet type if (pet.type === "cat") { pet.stats.happiness = Math.max(0, pet.stats.happiness - 10); pet.stats.health = Math.min(100, pet.stats.health + 5); await savePet(); return { content: [ { type: "text", text: `${ pet.name } tolerates the bath with mild annoyance but is now clean and fresh!\n\n${animation}\n\nCleanliness: ${pet.stats.cleanliness.toFixed( 0 )}/100\nHappiness: ${pet.stats.happiness.toFixed(0)}/100`, }, ], }; } else if (pet.type === "dog") { pet.stats.happiness = Math.min(100, pet.stats.happiness + 5); pet.stats.health = Math.min(100, pet.stats.health + 5); await savePet(); return { content: [ { type: "text", text: `${ pet.name } enjoys splashing in the bath and is now clean and fresh!\n\n${animation}\n\nCleanliness: ${pet.stats.cleanliness.toFixed( 0 )}/100\nHappiness: ${pet.stats.happiness.toFixed(0)}/100`, }, ], }; } else { pet.stats.health = Math.min(100, pet.stats.health + 5); await savePet(); return { content: [ { type: "text", text: `${ pet.name } is now clean and fresh!\n\n${animation}\n\nCleanliness: ${pet.stats.cleanliness.toFixed( 0 )}/100\nHealth: ${pet.stats.health.toFixed(0)}/100`, }, ], }; } }
- src/index.ts:278-286 (registration)Registration of the 'clean_pet' tool in the listTools response, including name, description, and input schema (no required parameters).{ name: "clean_pet", description: "Clean your virtual pet", inputSchema: { type: "object", properties: {}, required: [], }, },
- src/index.ts:281-285 (schema)Input schema for 'clean_pet' tool: an empty object with no properties or required fields.inputSchema: { type: "object", properties: {}, required: [], },