Skip to main content
Glama

create_pet

Generate and adopt a virtual pet by selecting a unique name and type (cat, dog, dragon, or alien) to nurture and evolve in a nostalgic digital environment.

Instructions

Create a new virtual pet

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameYesName for your new pet
typeYesType of pet: cat, dog, dragon, or alien

Implementation Reference

  • The handler function for the 'create_pet' tool. Validates input parameters (name and type), creates a new pet object based on DEFAULT_PET, initializes timestamps, saves the pet data to file, retrieves an idle animation, and returns a success response with the animation.
    case "create_pet": {
      const name = String(request.params.arguments?.name);
      const type = String(request.params.arguments?.type) as PetType;
    
      if (!name || !type) {
        return {
          isError: true,
          content: [
            {
              type: "text",
              text: "Name and type are required to create a pet.",
            },
          ],
        };
      }
    
      if (!["cat", "dog", "dragon", "alien"].includes(type)) {
        return {
          isError: true,
          content: [
            {
              type: "text",
              text: "Pet type must be one of: cat, dog, dragon, alien.",
            },
          ],
        };
      }
    
      // Create a new pet
      pet = {
        ...DEFAULT_PET,
        name,
        type,
        created: Date.now(),
        lastInteraction: Date.now(),
      };
    
      await savePet();
    
      // Get an idle animation for the new pet
      const animation = getIdleAnimation(pet.type);
    
      return {
        content: [
          {
            type: "text",
            text: `Congratulations! You've created a new ${type} named ${name}!\n\n${animation}\n\nMake sure to take good care of your new friend!`,
          },
        ],
      };
    }
  • src/index.ts:220-238 (registration)
    Registration of the 'create_pet' tool in the ListToolsRequestSchema handler, including name, description, and input schema definition for validation.
    {
      name: "create_pet",
      description: "Create a new virtual pet",
      inputSchema: {
        type: "object",
        properties: {
          name: {
            type: "string",
            description: "Name for your new pet",
          },
          type: {
            type: "string",
            enum: ["cat", "dog", "dragon", "alien"],
            description: "Type of pet: cat, dog, dragon, or alien",
          },
        },
        required: ["name", "type"],
      },
    },
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. It states the tool creates a pet but doesn't explain what 'virtual' entails, whether this is a one-time or repeatable action, what happens on success/failure, or any side effects like resource consumption. This leaves significant gaps for a mutation tool.

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, efficient sentence that directly states the tool's purpose without any wasted words. It is appropriately sized and front-loaded, making it easy to understand at a glance.

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 that this is a mutation tool with no annotations and no output schema, the description is incomplete. It doesn't cover behavioral aspects like what the tool returns, error conditions, or how it interacts with sibling tools, leaving the agent with insufficient context for reliable use.

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 schema description coverage is 100%, with clear descriptions for both parameters, including an enum for 'type'. The description adds no additional parameter information beyond what the schema provides, so it meets the baseline score without adding extra value.

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 ('Create') and resource ('new virtual pet'), making the purpose immediately understandable. However, it doesn't differentiate this tool from sibling tools like 'check_pet' or 'feed_pet' beyond the creation aspect, which prevents a perfect score.

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 'check_pet' or 'feed_pet'. It lacks context about prerequisites, such as whether a pet must be created before using other tools, or any exclusions for usage scenarios.

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