Skip to main content
Glama
leo4life2

Minecraft MCP Server

by leo4life2

cookItem

Cook items in Minecraft using a furnace by specifying the item name, fuel, and quantity. Part of the MCP server’s features for automating in-game tasks.

Instructions

Cook an item in a furnace

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
countYesNumber of items to cook
fuelNameYesThe fuel to use for cooking
itemNameYesThe name of the item to cook

Implementation Reference

  • The primary handler function implementing the cookItem tool. It validates input parameters (itemName, fuelName), sets default count, and delegates to useFurnace helper with action 'cook' to perform the cooking.
    export const cookItem = async (
      bot: Bot,
      params: ISkillParams,
      serviceParams: ISkillServiceParams,
    ): Promise<boolean> => {
      const skillName = 'cookItem';
      const requiredParams = ['itemName', 'fuelName'];
      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 defaultParams = {
        count: 1,
      };
      const useCount: number = Math.min(defaultParams.count, 4);
    
      return await useFurnace(bot, {
        itemName: params.itemName,
        fuelName: params.fuelName,
        count: useCount,
        action: 'cook',
        signal: serviceParams.signal,
        getStatsData: serviceParams.getStatsData,
        setStatsData: serviceParams.setStatsData,
      });
    };
  • Schema metadata for cookItem tool defining input parameters (itemName, fuelName, count), descriptions, and required fields. Used to build the inputSchema for the SkillDefinition.
    cookItem: {
        description: "Cook an item in a furnace",
        params: {
            itemName: { type: "string", description: "The name of the item to cook" },
            fuelName: { type: "string", description: "The fuel to use for cooking" },
            count: { type: "number", description: "Number of items to cook" }
        },
        required: ["itemName", "fuelName", "count"]
    },
  • Registration code within loadSkills() that iterates over SKILL_METADATA (including cookItem), creates SkillDefinition with schema and dynamic executor loader, and collects them for use in the MCP server.
    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)
        });
    }
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 ('cook') but does not explain outcomes, permissions, resource consumption, or error conditions. For a mutation tool, this is a significant gap in transparency.

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, efficient sentence with no wasted words. It is front-loaded and directly states the tool's purpose, making it highly concise and well-structured.

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 complexity of a mutation tool with no annotations and no output schema, the description is incomplete. It lacks details on behavior, results, or error handling, which are crucial for an AI agent to use the tool effectively.

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

Parameters3/5

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

Schema description coverage is 100%, so the input schema fully documents the parameters. The description does not add any additional meaning or context beyond what the schema provides, such as examples or constraints, resulting in a baseline score.

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 action ('cook') and resource ('an item in a furnace'), making the purpose understandable. However, it does not differentiate from sibling tools like 'smeltItem' or 'craftItems', which might involve similar furnace-based operations, leaving some ambiguity about when to choose this specific tool.

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 such as 'smeltItem' or 'craftItems'. The description lacks context about prerequisites, exclusions, or specific scenarios, leaving the agent without clear usage instructions.

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