Skip to main content
Glama
leo4life2

Minecraft MCP Server

by leo4life2

openInventory

Access and manage the bot's inventory on Minecraft MCP Server, enabling precise control over items for crafting, building, and other in-game tasks.

Instructions

Open the bot's inventory

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The handler function that implements the 'openInventory' tool logic. It checks for required parameters (none), lists all items in the bot's inventory, formats a descriptive string, logs it, emits an end observation event, and returns success.
    export const openInventory = async (
      bot: Bot,
      params: ISkillParams,
      serviceParams: ISkillServiceParams,
    ): Promise<boolean> => {
      const skillName = 'openInventory';
      const requiredParams: string[] = [];
      const isParamsValid = validateSkillParams(
        params,
        requiredParams,
        skillName,
      );
      if (!isParamsValid) {
        serviceParams.cancelExecution?.();
        bot.emit(
          'alteraBotEndObservation',
          `Mistake: You didn't provide all of the required parameters ${requiredParams.join(', ')} for the ${skillName} skill.`,
        );
        return false;
      }
    
      const inventory = bot.inventory.items();
    
      let inventoryStr = inventory
        .map((item) => `${item.count} ${item.displayName.toLowerCase()}`)
        .join(', ');
    
      if (inventoryStr.length === 0) inventoryStr = 'nothing.';
    
      const logMessage = `You just finished examining your inventory and it contains: ${inventoryStr}.`;
      console.log(logMessage);
      bot.emit('alteraBotEndObservation', logMessage);
      return true;
    };
  • Schema definition for the 'openInventory' tool, specifying no input parameters are required.
    openInventory: {
        description: "Open the bot's inventory",
        params: {},
        required: []
    },
  • The loadSkills function iterates over SKILL_METADATA (which includes 'openInventory') to register all skills by creating SkillDefinition objects with name, description, inputSchema, and a dynamic executor that loads the implementation from the skills/verified directory.
    export async function loadSkills(): Promise<SkillDefinition[]> {
        const skills: SkillDefinition[] = [];
    
        for (const [skillName, metadata] of Object.entries(SKILL_METADATA)) {
            skills.push({
                name: skillName,
                description: metadata.description,
                inputSchema: {
                    type: "object",
                    properties: metadata.params,
                    required: metadata.required
                },
                execute: createSkillExecutor(skillName)
            });
        }
    
        return skills;
    }
Behavior1/5

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

No annotations are provided, so the description carries the full burden of behavioral disclosure. 'Open the bot's inventory' doesn't reveal whether this is a read-only operation, whether it modifies state, what permissions are required, what happens if the bot has no inventory, or what the expected outcome is. For a tool with zero annotation coverage, this description provides almost no behavioral information.

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 extremely concise at just four words. It's front-loaded with the core action and doesn't waste words. For such a simple tool with no parameters, this brevity is appropriate rather than under-specified.

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 the context of a gaming bot with many sibling tools, this description is inadequate. There's no output schema, no annotations, and the description doesn't explain what 'opening' the inventory means operationally - whether it displays items, enables other actions, or has side effects. For a tool in this complex ecosystem, more context is needed about what this enables and how it differs from other inventory interactions.

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 tool has zero parameters, and schema description coverage is 100% (though trivial since there are no parameters). The description doesn't need to explain parameters, and it doesn't attempt to. With no parameters to document, the baseline for this dimension is 4.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose2/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description 'Open the bot's inventory' is a tautology that essentially restates the tool name 'openInventory'. It doesn't provide any additional specificity about what 'opening the inventory' entails or what resource is being accessed. While it's clear this involves an inventory, it doesn't distinguish this from other inventory-related tools like 'dropItem', 'equipItem', or 'giveItemToSomeone'.

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 about when to use this tool versus alternatives. It doesn't mention prerequisites (like needing to be in a game or have items), appropriate contexts, or what this tool enables that other inventory tools don't. With many sibling tools that interact with inventory items, this lack of differentiation is problematic.

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/leo4life2/minecraft-mcp-http'

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