Skip to main content
Glama

get-block-info

Retrieve detailed block information from a Minecraft world by specifying precise X, Y, and Z coordinates through the mcp-minecraft server API.

Instructions

Get information about a block at the specified position

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
xYesX coordinate
yYesY coordinate
zYesZ coordinate

Implementation Reference

  • The handler function that executes the tool logic: retrieves the block at the given (x,y,z) position using bot.blockAt and returns its name, type, and position.
    async ({ x, y, z }) => { const bot = getBot(); const blockPos = new Vec3(x, y, z); const block = bot.blockAt(blockPos); if (!block) { return factory.createResponse(`No block information found at position (${x}, ${y}, ${z})`); } return factory.createResponse(`Found ${block.name} (type: ${block.type}) at position (${block.position.x}, ${block.position.y}, ${block.position.z})`); }
  • Zod schema defining the input parameters: numeric x, y, z coordinates.
    { x: z.number().describe("X coordinate"), y: z.number().describe("Y coordinate"), z: z.number().describe("Z coordinate"), },
  • Direct registration of the "get-block-info" tool with factory.registerTool, including description, schema, and inline handler.
    factory.registerTool( "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 }) => { const bot = getBot(); const blockPos = new Vec3(x, y, z); const block = bot.blockAt(blockPos); if (!block) { return factory.createResponse(`No block information found at position (${x}, ${y}, ${z})`); } return factory.createResponse(`Found ${block.name} (type: ${block.type}) at position (${block.position.x}, ${block.position.y}, ${block.position.z})`); } );

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

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