Skip to main content
Glama

equip_item

Equip a pet, mount, costume, or battle gear in Habitica using the item's key. Specify the type to assign equipment to your avatar.

Instructions

Equip a pet, mount, costume piece, or battle gear.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
typeYes
keyYes

Implementation Reference

  • Input schema definition for equip_item tool: requires 'type' (enum: pet, mount, costume, or equipped) and 'key' (string).
    {
      name: "equip_item",
      description: "Equip a pet, mount, costume piece, or battle gear.",
      inputSchema: {
        type: "object",
        properties: {
          type: { type: "string", enum: ["pet", "mount", "costume", "equipped"] },
          key: { type: "string" },
        },
        required: ["type", "key"],
      },
    },
  • Handler function for equip_item: calls Habitica API POST /user/equip/{type}/{key} to equip a pet, mount, costume piece, or battle gear.
    equip_item: async ({ type, key }) => {
      await api("POST", `/user/equip/${type}/${encodeURIComponent(key)}`);
      return ok(`Equipped ${type}: ${key}`);
    },
  • index.js:480-480 (registration)
    Tools array is registered with the MCP server via ListToolsRequestSchema handler.
    server.setRequestHandler(ListToolsRequestSchema, async () => ({ tools }));
  • index.js:482-492 (registration)
    CallToolRequestSchema handler dispatches incoming tool calls to the handlers object (including equip_item).
    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));
      }
    });
  • The api() helper function used by equip_item to make HTTP requests to the Habitica API.
    async function api(method, path, body) {
      const url = `${API_BASE}${path}`;
      const headers = {
        "x-api-user": USER_ID,
        "x-api-key": API_TOKEN,
        "x-client": `${USER_ID}-${APP_ID}`,
        "Content-Type": "application/json",
      };
      const res = await fetch(url, {
        method,
        headers,
        body: body === undefined ? undefined : JSON.stringify(body),
      });
      const text = await res.text();
      let payload;
      try {
        payload = text ? JSON.parse(text) : {};
      } catch {
        payload = { raw: text };
      }
      if (!res.ok) {
        const msg = payload?.message || payload?.error || res.statusText;
        throw new McpError(
          ErrorCode.InternalError,
          `Habitica API ${res.status}: ${msg}`,
        );
      }
      return payload;
    }
Behavior2/5

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

No annotations are present, so the description carries full responsibility for behavioral disclosure. It does not explain side effects (e.g., whether equipping replaces an existing item) or any requirements like ownership.

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?

The single sentence is brief, but it sacrifices necessary detail for brevity. It could be restructured to include parameter explanations without increasing length significantly.

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 annotations, no output schema, and two parameters, the description is insufficient. It fails to explain what 'equipped' means as a type, how to obtain keys, or what the result of equipping is.

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?

Schema description coverage is 0%, yet the description adds little to the schema. The enum values are listed but not explained, and the 'key' parameter (likely an identifier) is not described at all.

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 verb 'Equip' and lists the types of items (pet, mount, costume piece, battle gear). However, it does not differentiate from sibling tools like 'feed_pet' or 'hatch_pet', which are also pet-related but have different purposes.

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 is provided on when to use this tool versus alternatives. There is no mention of prerequisites, context for use, or exclusions.

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