summon_entity
Summon Minecraft entities like zombies, villagers, or armor stands at specific coordinates using X, Y, Z positions and optional NBT data.
Instructions
Summon an entity at a position. Examples: 'zombie', 'skeleton', 'villager', 'item_frame', 'armor_stand'.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| entity | Yes | Entity ID (e.g., 'zombie', 'villager') | |
| x | Yes | X coordinate | |
| y | Yes | Y coordinate | |
| z | Yes | Z coordinate | |
| nbt | No | Optional NBT data as JSON string |
Implementation Reference
- src/tools/command-tools.ts:233-245 (handler)The handler function that constructs and executes the Minecraft RCON 'summon' command.
async ({ entity, x, y, z: zCoord, nbt }) => { const cmd = nbt ? `summon ${entity} ${x} ${y} ${zCoord} ${nbt}` : `summon ${entity} ${x} ${y} ${zCoord}`; try { const response = await manager.rcon.send(cmd); return { content: [{ type: "text", text: response }] }; } catch (error) { return { content: [ { type: "text", text: `Failed: ${error instanceof Error ? error.message : String(error)}`, - src/tools/command-tools.ts:223-232 (schema)Zod schema defining the input parameters for the summon_entity tool.
{ entity: z.string().describe("Entity ID (e.g., 'zombie', 'villager')"), x: z.number().describe("X coordinate"), y: z.number().describe("Y coordinate"), z: z.number().describe("Z coordinate"), nbt: z .string() .optional() .describe("Optional NBT data as JSON string"), }, - src/tools/command-tools.ts:220-222 (registration)Registration of the 'summon_entity' tool in the MCP server.
server.tool( "summon_entity", "Summon an entity at a position. Examples: 'zombie', 'skeleton', 'villager', 'item_frame', 'armor_stand'.",