fill_blocks
Fill a defined 3D region in Minecraft with blocks using coordinates and block IDs, supporting modes like replace, hollow, or outline for world editing.
Instructions
Fill a region with blocks. Uses the /fill command. Max 32,768 blocks per operation.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"x1": "<x1>",
"y1": "<y1>",
"z1": "<z1>",
"x2": "<x2>",
"y2": "<y2>",
"z2": "<z2>",
"block": "<block>"
},
"name": "fill_blocks"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| x1 | Yes | Start X | |
| y1 | Yes | Start Y | |
| z1 | Yes | Start Z | |
| x2 | Yes | End X | |
| y2 | Yes | End Y | |
| z2 | Yes | End Z | |
| block | Yes | Block ID | |
| mode | No | Fill mode | replace |
Implementation Reference
- src/tools/command-tools.ts:199-216 (handler)The handler function for the fill_blocks tool which executes the fill command via RCON.
async ({ x1, y1, z1, x2, y2, z2, block, mode }) => { try { const response = await manager.rcon.send( `fill ${x1} ${y1} ${z1} ${x2} ${y2} ${z2} ${block} ${mode}` ); return { content: [{ type: "text", text: response }] }; } catch (error) { return { content: [ { type: "text", text: `Failed: ${error instanceof Error ? error.message : String(error)}`, }, ], isError: true, }; } } - src/tools/command-tools.ts:185-198 (schema)Input schema for the fill_blocks tool.
{ x1: z.number().describe("Start X"), y1: z.number().describe("Start Y"), z1: z.number().describe("Start Z"), x2: z.number().describe("End X"), y2: z.number().describe("End Y"), z2: z.number().describe("End Z"), block: z.string().describe("Block ID"), mode: z .enum(["destroy", "hollow", "keep", "outline", "replace"]) .optional() .default("replace") .describe("Fill mode"), }, - src/tools/command-tools.ts:182-198 (registration)Registration of the fill_blocks tool with the MCP server.
server.tool( "fill_blocks", "Fill a region with blocks. Uses the /fill command. Max 32,768 blocks per operation.", { x1: z.number().describe("Start X"), y1: z.number().describe("Start Y"), z1: z.number().describe("Start Z"), x2: z.number().describe("End X"), y2: z.number().describe("End Y"), z2: z.number().describe("End Z"), block: z.string().describe("Block ID"), mode: z .enum(["destroy", "hollow", "keep", "outline", "replace"]) .optional() .default("replace") .describe("Fill mode"), },