Skip to main content
Glama
leo4life2

Minecraft MCP Server

by leo4life2

lookAround

Scan and analyze your Minecraft surroundings to generate a detailed text-based description of the environment, enabling better navigation and decision-making in the game.

Instructions

Look around and observe the environment, providing a detailed text-based view of surroundings

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The main handler function for the 'lookAround' tool. It gathers comprehensive environmental data including position, health, time, weather, biome, held item, nearby visible blocks (top 15 types), nearby entities, inventory summary (top 10 items), oxygen level, and open interfaces, then emits a formatted observation via bot events.
    export const lookAround = async (
        bot: Bot,
        params: ISkillParams,
        serviceParams: ISkillServiceParams,
    ): Promise<boolean> => {
        const skillName = 'lookAround';
        const requiredParams: string[] = [];
        const isParamsValid = validateSkillParams(
            { ...serviceParams },
            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;
        }
    
        bot.emit(
            'alteraBotStartObservation',
            `🔍 SCANNING ENVIRONMENT 🔍`,
        );
    
        const mcData = minecraftData(bot.version);
    
        try {
            bot.emit('alteraBotStartObservation', 'Looking around to observe the environment...');
    
            // Gather all observations
            const observations: string[] = [];
    
            // Location
            const pos = bot.entity.position;
            observations.push(`You are at coordinates X:${Math.floor(pos.x)}, Y:${Math.floor(pos.y)}, Z:${Math.floor(pos.z)}.`);
    
            // Health and food
            observations.push(`Your health is ${bot.health}/20 and hunger is ${bot.food}/20.`);
    
            // Time and weather
            const timeOfDay = getTimeOfDay(bot);
            const weather = getWeather(bot);
            observations.push(`It is ${timeOfDay} and the weather is ${weather}.`);
    
            // Biome
            const block = bot.blockAt(bot.entity.position);
            if (block && block.biome) {
                const biomeName = mcData.biomes[block.biome.id]?.name || 'unknown';
                observations.push(`You are in a ${biomeName} biome.`);
            }
    
            // Held item
            const heldItem = bot.heldItem;
            if (heldItem) {
                observations.push(`You are holding ${heldItem.name}.`);
            } else {
                observations.push(`You are not holding anything.`);
            }
    
            // Nearby blocks
            const nearbyBlocks = getNearbyBlocks(bot, 16);
            if (nearbyBlocks.length > 0) {
                observations.push(`\nYou see these blocks around you:`);
                // Group similar blocks
                const blockCounts: Record<string, number> = {};
                nearbyBlocks.forEach(block => {
                    blockCounts[block] = (blockCounts[block] || 0) + 1;
                });
    
                // Sort by count (most common first)
                const sortedBlocks = Object.entries(blockCounts)
                    .sort((a, b) => b[1] - a[1])
                    .slice(0, 15); // Limit to top 15 for readability
    
                sortedBlocks.forEach(([block, count]) => {
                    observations.push(`- ${count} ${block}`);
                });
    
                if (nearbyBlocks.length > 15) {
                    observations.push(`... and ${nearbyBlocks.length - 15} other block types`);
                }
            }
    
            // Nearby entities
            const nearbyEntities = getNearbyEntities(bot, 16);
            if (nearbyEntities.length > 0) {
                observations.push(`\nYou see these entities nearby:`);
                nearbyEntities.forEach(entity => {
                    observations.push(`- ${entity}`);
                });
            }
    
            // Inventory summary
            const inventory = getInventorySummary(bot);
            const itemCount = Object.keys(inventory).length;
            if (itemCount > 0) {
                observations.push(`\nYour inventory contains ${itemCount} different items:`);
                const sortedInventory = Object.entries(inventory)
                    .sort((a, b) => b[1] - a[1])
                    .slice(0, 10); // Show top 10 items
    
                sortedInventory.forEach(([item, count]) => {
                    observations.push(`- ${item}: ${count}`);
                });
    
                if (itemCount > 10) {
                    observations.push(`... and ${itemCount - 10} other item types`);
                }
            } else {
                observations.push(`\nYour inventory is empty.`);
            }
    
            // Check if drowning
            if (bot.oxygenLevel && bot.oxygenLevel < 20) {
                observations.push(`\nWARNING: You are underwater! Oxygen level: ${bot.oxygenLevel}/20`);
            }
    
            // Current interface
            if ((bot as any).currentInterface) {
                const currentInterface = (bot as any).currentInterface;
                observations.push(`\nYou have a ${currentInterface.title || 'interface'} open.`);
            }
    
            // Combine all observations
            const fullObservation = observations.join('\n');
            bot.emit('alteraBotEndObservation', fullObservation);
    
            return true;
        } catch (error) {
            console.error(`Error in lookAround skill: ${error}`);
            bot.emit('alteraBotEndObservation', `Failed to look around: ${error}`);
            return false;
        }
    }
  • Schema definition and metadata for the 'lookAround' tool, specifying no input parameters are required and providing the tool description.
    lookAround: {
        description: "Look around and observe the environment, providing a detailed text-based view of surroundings",
        params: {},
        required: []
    },
  • The loadSkills function registers all skills including 'lookAround' by creating SkillDefinition objects from SKILL_METADATA and dynamic executors that import and run the skill modules.
    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;
    }
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 tool provides a 'detailed text-based view' but doesn't specify what aspects are observed (e.g., objects, entities, terrain), whether it's passive or active, or any limitations like range or conditions. This leaves significant gaps in understanding how the tool behaves beyond its basic purpose.

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 that front-loads the core action ('look around and observe') and specifies the output. Every word earns its place with no redundancy or waste, making it highly concise and well-structured for quick understanding.

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 environmental observation in a game-like context with many sibling tools, the description is incomplete. It lacks details on what 'surroundings' include, how 'detailed' the view is, or any behavioral traits. With no annotations and no output schema, the agent has insufficient information to predict the tool's full behavior or output format.

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 0 parameters, and schema description coverage is 100%, so no parameter documentation is needed. The description doesn't add param info beyond the schema, but with no params, this is acceptable. Baseline is 4 as per rules for 0 parameters, since there's nothing to compensate for.

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 tool's purpose with specific verbs ('look around', 'observe') and resource ('environment'), and specifies the output ('detailed text-based view of surroundings'). It distinguishes itself from siblings by focusing on environmental observation rather than interaction or action. However, it doesn't explicitly contrast with specific sibling tools like 'readChat' or 'openInventory' that might also provide information.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies usage for gathering environmental information, which suggests when to use it (to understand surroundings). However, it doesn't provide explicit guidance on when NOT to use it or mention alternatives among the many sibling tools. The context is clear but lacks exclusions or comparative advice.

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