Skip to main content
Glama

check_pet

Monitor your virtual pet's status on MCPet to ensure its well-being and track its evolution based on your care. Stay updated with real-time insights.

Instructions

Check on your virtual pet's status

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The handler for the 'check_pet' tool. Updates the pet's stats based on time elapsed, loads the idle animation, generates a status description, and returns the current pet status including age.
    case "check_pet": {
      if (!pet) {
        return {
          content: [
            {
              type: "text",
              text: "You don't have a pet yet! Use the create_pet tool to create one.",
            },
          ],
        };
      }
    
      updatePetStats();
      await savePet();
    
      // Get the idle animation for status check
      const animation = getIdleAnimation(pet.type);
    
      return {
        content: [
          {
            type: "text",
            text: `${animation}\n\n${getStatusDescription()}\n\nAge: ${pet.age.toFixed(
              1
            )} days`,
          },
        ],
      };
    }
  • src/index.ts:239-247 (registration)
    Registration of the 'check_pet' tool in the ListTools handler, including name, description, and input schema (no required parameters).
    {
      name: "check_pet",
      description: "Check on your virtual pet's status",
      inputSchema: {
        type: "object",
        properties: {},
        required: [],
      },
    },
  • Helper function getStatusDescription() that generates a detailed text description of the pet's stats for use in the check_pet response.
    function getStatusDescription() {
      if (!pet) {
        return "You don't have a pet yet! Create one first.";
      }
    
      const { hunger, happiness, health, energy, cleanliness } = pet.stats;
      let statusDescription = `${pet.name} is a ${pet.stage} ${pet.type}.\n`;
    
      // Add descriptions based on stats
      if (hunger < 20) {
        statusDescription += "🍽️ Very hungry! Needs food immediately!\n";
      } else if (hunger < 50) {
        statusDescription += "🍽️ Getting hungry.\n";
      } else {
        statusDescription += "🍽️ Well fed.\n";
      }
    
      if (happiness < 20) {
        statusDescription += "😢 Very sad! Needs fun activities!\n";
      } else if (happiness < 50) {
        statusDescription += "😐 Could use some playtime.\n";
      } else {
        statusDescription += "😊 Happy and content.\n";
      }
    
      if (cleanliness < 20) {
        statusDescription += "🛁 Very dirty! Needs cleaning!\n";
      } else if (cleanliness < 50) {
        statusDescription += "🛁 Getting dirty.\n";
      } else {
        statusDescription += "✨ Clean and fresh.\n";
      }
    
      if (energy < 20) {
        statusDescription += "💤 Exhausted! Needs rest!\n";
      } else if (energy < 50) {
        statusDescription += "💤 Getting tired.\n";
      } else {
        statusDescription += "⚡ Energetic and active.\n";
      }
    
      if (health < 20) {
        statusDescription += "🏥 Very sick! Needs medicine and care!\n";
      } else if (health < 50) {
        statusDescription += "🏥 Not feeling well.\n";
      } else {
        statusDescription += "❤️ Healthy.\n";
      }
    
      return statusDescription;
    }
  • Helper function updatePetStats() that simulates time passage effects on pet stats, age, and stage, called in check_pet.
    function updatePetStats() {
      if (!pet) return;
    
      // Calculate time passed since last interaction
      const now = Date.now();
      const hoursPassed = (now - pet.lastInteraction) / (1000 * 60 * 60);
    
      // Update stats based on time (pets get hungrier, dirtier, and less happy over time)
      pet.stats.hunger = Math.max(0, pet.stats.hunger - hoursPassed * 5);
      pet.stats.happiness = Math.max(0, pet.stats.happiness - hoursPassed * 3);
      pet.stats.cleanliness = Math.max(0, pet.stats.cleanliness - hoursPassed * 4);
      pet.stats.energy = Math.min(100, pet.stats.energy + hoursPassed * 2); // Gain energy when left alone
    
      // Health decreases if hunger or cleanliness is very low
      if (pet.stats.hunger < 20 || pet.stats.cleanliness < 20) {
        pet.stats.health = Math.max(0, pet.stats.health - hoursPassed * 2);
      }
    
      // Age increases over time
      pet.age += hoursPassed / 24; // Age in days
    
      // Check for evolution based on age
      if (pet.age > 10 && pet.stage === "baby") {
        pet.stage = "child";
      } else if (pet.age > 20 && pet.stage === "child") {
        pet.stage = "teen";
      } else if (pet.age > 30 && pet.stage === "teen") {
        pet.stage = "adult";
      }
    }
Behavior2/5

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

With no annotations provided, the description carries full burden for behavioral disclosure. It states the tool checks status but doesn't reveal whether this is a read-only operation, has side effects, requires authentication, or has rate limits. The description is minimal and misses key behavioral context needed for safe invocation.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, clear sentence that efficiently conveys the core purpose. It's appropriately sized for a simple tool with no parameters, though it could be slightly more informative without losing conciseness. No wasted words or redundant information.

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 tool's simplicity (0 parameters, no output schema), the description is incomplete. It doesn't explain what status information is returned, format of response, or error conditions. For a status-checking tool in a pet management system, users need to know what metrics are available (health, hunger, etc.) to use it effectively.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The tool has 0 parameters with 100% schema description coverage, so no parameter documentation is needed. The description appropriately doesn't discuss parameters, maintaining focus on the tool's purpose. Baseline score of 4 applies for zero-parameter tools when the description doesn't attempt to explain non-existent parameters.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose3/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description states the tool's purpose as checking a virtual pet's status, which is clear but vague about what specific status information is retrieved. It distinguishes from siblings like feed_pet or play_with_pet by focusing on status checking rather than interaction, but doesn't specify what aspects of status are included (e.g., health, happiness, energy).

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. It doesn't mention prerequisites (e.g., whether a pet must exist), frequency recommendations, or relationship to other tools like create_pet (for initialization) or clean_pet (for maintenance). The agent must infer usage from the tool name alone.

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

Related 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/shreyaskarnik/mcpet'

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