Skip to main content
Glama

get_pets

Retrieve a map of all pets you own in Habitica, including counts for each pet, to track your collection.

Instructions

Get owned pets map.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • index.js:249-253 (registration)
    Tool 'get_pets' is registered in the tools array with name 'get_pets', description 'Get owned pets map.', and an empty inputSchema (no parameters).
    {
      name: "get_pets",
      description: "Get owned pets map.",
      inputSchema: { type: "object", properties: {} },
    },
  • Handler for get_pets: calls Habitica API GET /user, then extracts data?.items?.pets and formats as JSON text.
    get_pets: async () => json((await api("GET", "/user")).data?.items?.pets),
  • Helper functions: ok() wraps text in MCP content response; json() stringifies an object as pretty-printed JSON.
    const ok = (text) => ({ content: [{ type: "text", text }] });
    const json = (obj) => ok(JSON.stringify(obj, null, 2));
  • The CallToolRequestSchema handler that dispatches tool calls to handlers[name] and returns the result.
    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));
      }
    });
Behavior3/5

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

Description implies a read-only operation ('Get'), but no annotations provided. Lacks details on output format or any side effects.

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?

Single sentence with no extraneous information. Perfectly concise.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a parameterless read tool, description is minimally adequate. Could clarify 'map' details but not essential.

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?

No parameters, so schema coverage is 100%. Description adds no parameter info but is unnecessary. Baseline 4 is appropriate.

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?

Clearly states it retrieves owned pets map, specifying verb and resource. However, 'map' is slightly ambiguous without context.

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 versus alternatives like feed_pet or hatch_pet. No exclusions or prerequisites 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