Skip to main content
Glama

feed_pet

Provide food to your digital companion on MCPet by selecting snack, meal, or feast to nurture its growth and monitor its evolution.

Instructions

Feed your virtual pet

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
foodYesType of food: snack, meal, or feast

Implementation Reference

  • The handler function that executes the feed_pet tool. It validates the food type (snack, meal, or feast), updates the pet's hunger and health stats based on the food, calls updatePetStats and savePet, retrieves an eating animation, and returns a response with updated stats.
    case "feed_pet": {
      if (!pet) {
        return {
          content: [
            {
              type: "text",
              text: "You don't have a pet yet! Use the create_pet tool to create one.",
            },
          ],
        };
      }
    
      const food = String(request.params.arguments?.food);
    
      if (!["snack", "meal", "feast"].includes(food)) {
        return {
          isError: true,
          content: [
            {
              type: "text",
              text: "Food type must be one of: snack, meal, feast.",
            },
          ],
        };
      }
    
      updatePetStats();
    
      // Different foods provide different amounts of satiety
      let hungerIncrease = 0;
      let healthChange = 0;
      let response = "";
    
      if (food === "snack") {
        hungerIncrease = 10;
        healthChange = 0;
        response = `${pet.name} enjoys the small snack. Not very filling, but tasty!`;
      } else if (food === "meal") {
        hungerIncrease = 30;
        healthChange = 5;
        response = `${pet.name} happily eats the nutritious meal and feels satisfied.`;
      } else if (food === "feast") {
        hungerIncrease = 60;
        healthChange = -5; // Too much food is unhealthy
        response = `${pet.name} devours the enormous feast! Almost too much food!`;
      }
    
      pet.stats.hunger = Math.min(100, pet.stats.hunger + hungerIncrease);
      pet.stats.health = Math.min(
        100,
        Math.max(0, pet.stats.health + healthChange)
      );
    
      await savePet();
    
      // Get appropriate animation for the food type
      const animation = getEatingAnimation(pet.type, food);
    
      return {
        content: [
          {
            type: "text",
            text: `${response}\n\n${animation}\n\nHunger: ${pet.stats.hunger.toFixed(
              0
            )}/100\nHealth: ${pet.stats.health.toFixed(0)}/100`,
          },
        ],
      };
    }
  • src/index.ts:248-262 (registration)
    The registration of the feed_pet tool in the listTools response, including its name, description, and input schema definition.
    {
      name: "feed_pet",
      description: "Feed your virtual pet",
      inputSchema: {
        type: "object",
        properties: {
          food: {
            type: "string",
            enum: ["snack", "meal", "feast"],
            description: "Type of food: snack, meal, or feast",
          },
        },
        required: ["food"],
      },
    },
  • The input schema for the feed_pet tool, defining the required 'food' parameter with allowed values: snack, meal, feast.
    inputSchema: {
      type: "object",
      properties: {
        food: {
          type: "string",
          enum: ["snack", "meal", "feast"],
          description: "Type of food: snack, meal, or feast",
        },
      },
      required: ["food"],
    },
Behavior2/5

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

No annotations are provided, so the description carries the full burden of behavioral disclosure. 'Feed your virtual pet' implies a mutation (feeding changes pet state), but it doesn't specify what effects occur (e.g., increases energy, affects mood), whether it's idempotent, or any side effects like cooldowns. This leaves critical behavioral traits undocumented, making it inadequate for a mutation tool with zero annotation coverage.

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 concise with a single sentence 'Feed your virtual pet', which is front-loaded and wastes no words. However, it's overly brief, bordering on under-specification, as it lacks necessary details for a mutation tool. While efficient, it could benefit from slightly more context without sacrificing brevity.

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 complexity as a mutation with no annotations and no output schema, the description is incomplete. It doesn't explain what feeding does (e.g., returns pet status or success message), potential errors, or behavioral nuances. For a tool that likely changes state, this leaves too many gaps, making it inadequate for effective use without additional inference.

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 adds no parameter semantics beyond what the input schema provides. The schema has 100% coverage with a clear description and enum for the 'food' parameter, detailing types like 'snack', 'meal', or 'feast'. Since the schema does the heavy lifting, the baseline score is 3, as the description doesn't compensate or add extra meaning, but it also doesn't contradict the schema.

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 'Feed your virtual pet' clearly states the action (feed) and target (virtual pet), providing a basic purpose. However, it doesn't distinguish this tool from sibling tools like 'play_with_pet' or 'put_to_bed' beyond the obvious action difference, nor does it specify what feeding accomplishes (e.g., increases happiness or health). This makes it vague in context, as it lacks sibling differentiation and specific outcomes.

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 offers no guidance on when to use this tool versus alternatives. It doesn't mention prerequisites (e.g., pet must be awake or hungry), exclusions (e.g., don't use if pet is full), or comparisons to siblings like 'check_pet' for status monitoring. Without such context, users must infer usage from the tool name alone, which is insufficient for informed selection.

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