Skip to main content
Glama
zeeweebee

Minecraft MCP Server

by zeeweebee

get-block-info

Retrieve detailed block data at specific coordinates in Minecraft using this tool. Input X, Y, Z values to access block information, enabling precise in-game interactions and exploration.

Instructions

Get information about a block at the specified position

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
xYesX coordinate
yYesY coordinate
zYesZ coordinate

Implementation Reference

  • Handler function that retrieves block information at the specified coordinates using bot.blockAt and returns details about the block.
    async ({ x, y, z }): Promise<McpResponse> => { try { const blockPos = new Vec3(x, y, z); const block = bot.blockAt(blockPos); if (!block) { return createResponse(`No block information found at position (${x}, ${y}, ${z})`); } return createResponse(`Found ${block.name} (type: ${block.type}) at position (${block.position.x}, ${block.position.y}, ${block.position.z})`); } catch (error) { return createErrorResponse(error as Error); } }
  • Input schema defining x, y, z coordinates using Zod validation.
    { x: z.number().describe("X coordinate"), y: z.number().describe("Y coordinate"), z: z.number().describe("Z coordinate"), },
  • src/bot.ts:438-459 (registration)
    Registration of the get-block-info tool using McpServer.tool, including name, description, schema, and handler.
    server.tool( "get-block-info", "Get information about a block at the specified position", { x: z.number().describe("X coordinate"), y: z.number().describe("Y coordinate"), z: z.number().describe("Z coordinate"), }, async ({ x, y, z }): Promise<McpResponse> => { try { const blockPos = new Vec3(x, y, z); const block = bot.blockAt(blockPos); if (!block) { return createResponse(`No block information found at position (${x}, ${y}, ${z})`); } return createResponse(`Found ${block.name} (type: ${block.type}) at position (${block.position.x}, ${block.position.y}, ${block.position.z})`); } catch (error) { return createErrorResponse(error as Error); } }

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/zeeweebee/mcp-server'

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