Skip to main content
Glama

hatch_pet

Hatch a pet by combining an egg with a hatching potion using the Habitica API to add a new pet to your inventory.

Instructions

Hatch a pet from an egg + hatching potion.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
eggYes
hatchingPotionYes

Implementation Reference

  • Tool definition and input schema for 'hatch_pet'. Defines the tool name, description, and required parameters (egg, hatchingPotion).
    {
      name: "hatch_pet",
      description: "Hatch a pet from an egg + hatching potion.",
      inputSchema: {
        type: "object",
        properties: {
          egg: { type: "string" },
          hatchingPotion: { type: "string" },
        },
        required: ["egg", "hatchingPotion"],
      },
    },
  • Handler function for 'hatch_pet'. Calls the Habitica API POST /user/hatch/{egg}/{hatchingPotion} to hatch a pet from an egg and hatching potion.
    hatch_pet: async ({ egg, hatchingPotion }) => {
      await api("POST", `/user/hatch/${encodeURIComponent(egg)}/${encodeURIComponent(hatchingPotion)}`);
      return ok(`Hatched ${egg}-${hatchingPotion}.`);
    },
  • index.js:480-492 (registration)
    Server registration: tools are listed via ListToolsRequestSchema and dispatched to handlers via CallToolRequestSchema which looks up the handler by name.
    server.setRequestHandler(ListToolsRequestSchema, async () => ({ tools }));
    
    server.setRequestHandler(CallToolRequestSchema, async (req) => {
      const { name, arguments: args = {} } = req.params;
      const fn = handlers[name];
      if (!fn) throw new McpError(ErrorCode.MethodNotFound, `Unknown tool: ${name}`);
      try {
        return await fn(args);
      } catch (err) {
        if (err instanceof McpError) throw err;
        throw new McpError(ErrorCode.InternalError, err?.message ?? String(err));
      }
    });
Behavior2/5

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

No annotations provided. Description does not disclose behavioral traits such as whether items are consumed, if the operation is destructive, or what happens on success/failure.

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

Conciseness3/5

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

Description is very short (one sentence) and conveys the basic idea, but could be expanded to include more context without becoming verbose.

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 no output schema and no annotations, the description is incomplete. It lacks details on return values, side effects, or required permissions.

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

Parameters2/5

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

Input schema has 0% description coverage. Description only mentions 'egg' and 'hatching potion' without adding meaning (e.g., valid formats, item IDs, constraints).

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?

Description clearly states the action (hatch) and resource (pet) with required items (egg + hatching potion). It distinguishes from siblings like feed_pet or get_pets, but could be more specific about outcome.

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?

No guidance on when to use this tool vs alternatives like feed_pet or get_pets. No prerequisites or exclusions mentioned.

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/leon-jarvis1/habitca_mcp'

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