Skip to main content
Glama

list-inventory

View all items in the bot's inventory to manage resources and plan actions in Minecraft.

Instructions

List all items in the bot's inventory

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • Handler function that lists all items in the bot's inventory by fetching from bot.inventory.items(), mapping to a list, and formatting as text response.
    async () => {
      const bot = getBot();
      const items = bot.inventory.items();
      const itemList: InventoryItem[] = items.map((item) => ({
        name: item.name,
        count: item.count,
        slot: item.slot
      }));
    
      if (items.length === 0) {
        return factory.createResponse("Inventory is empty");
      }
    
      let inventoryText = `Found ${items.length} items in inventory:\n\n`;
      itemList.forEach(item => {
        inventoryText += `- ${item.name} (x${item.count}) in slot ${item.slot}\n`;
      });
    
      return factory.createResponse(inventoryText);
    }
  • Registers the list-inventory tool with ToolFactory, including description, empty input schema {}, and inline handler.
    factory.registerTool(
      "list-inventory",
      "List all items in the bot's inventory",
      {},
      async () => {
        const bot = getBot();
        const items = bot.inventory.items();
        const itemList: InventoryItem[] = items.map((item) => ({
          name: item.name,
          count: item.count,
          slot: item.slot
        }));
    
        if (items.length === 0) {
          return factory.createResponse("Inventory is empty");
        }
    
        let inventoryText = `Found ${items.length} items in inventory:\n\n`;
        itemList.forEach(item => {
          inventoryText += `- ${item.name} (x${item.count}) in slot ${item.slot}\n`;
        });
    
        return factory.createResponse(inventoryText);
      }
    );
  • src/main.ts:52-52 (registration)
    Top-level call to registerInventoryTools function, which registers the list-inventory tool among others.
    registerInventoryTools(factory, getBot);
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 action ('List all items') but doesn't describe what the output looks like (e.g., format, pagination, or sorting), whether it requires specific permissions, or if there are rate limits. This leaves significant gaps in understanding how the tool behaves in practice.

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, clear sentence with zero waste—it directly states the tool's purpose without fluff or redundancy. It's appropriately sized and front-loaded, making it easy for an agent to parse quickly.

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

Completeness3/5

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

Given the tool's simplicity (0 parameters, no annotations, no output schema), the description is minimally adequate. It tells the agent what the tool does but lacks details on output format or behavioral constraints, which could be important for a list operation. It meets the basic requirement but doesn't provide full context for reliable use.

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?

The input schema has 0 parameters with 100% coverage, meaning there's nothing to document. The description appropriately doesn't mention parameters, which is correct for a parameterless tool. A baseline of 4 is applied since no parameter information is needed, and the description doesn't add unnecessary details.

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 ('List') and resource ('all items in the bot's inventory'), making the tool's purpose immediately understandable. However, it doesn't differentiate from potential sibling tools like 'find-item' or 'equip-item', which might also interact with inventory items in different ways, preventing 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. Given the sibling tools include 'find-item' (which likely searches for specific items) and 'equip-item' (which modifies inventory), there's no indication of when a full list is preferable to targeted operations, leaving the agent to guess based on context alone.

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/yuniko-software/minecraft-mcp-server'

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