Skip to main content
Glama
Mming-Lab
by Mming-Lab

build_cylinder

Create cylinders, towers, or pipes in Minecraft Bedrock by specifying center coordinates, radius, height, and material. Choose axis (y, x, z) and hollow or solid design for versatile builds.

Instructions

Build CYLINDER: tower, pillar, column, chimney, pipe, tube. Requires: centerX,centerY,centerZ,radius,height. Optional: axis

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
actionNoBuild action to performbuild
axisNoDirection the cylinder extends: y=vertical (normal tower), x=horizontal east-west, z=horizontal north-southy
centerXYesCenter X coordinate (east-west position where the cylinder will be centered)
centerYYesBottom Y coordinate (ground level height where cylinder starts, typically 64)
centerZYesCenter Z coordinate (north-south position where the cylinder will be centered)
heightYesHeight in blocks (how tall the cylinder is). Short: 5-10, Medium: 15-25, Tall: 30-50
hollowNoMake it hollow (true) for cylinder shell/walls only, or solid (false) for full cylinder
materialNoBlock type to build with (e.g. stone, brick, concrete, wood, etc.)minecraft:stone
radiusYesRadius in blocks (how wide the cylinder is). Thin: 2-4, Medium: 5-10, Wide: 15-30

Implementation Reference

  • The primary handler function that implements the build_cylinder tool logic: validates inputs, calculates cylinder positions, checks limits, and executes the build using optimized build executor.
    async execute(args: {
        action?: string;
        centerX: number;
        centerY: number;
        centerZ: number;
        radius: number;
        height: number;
        material?: string;
        hollow?: boolean;
        axis?: string;
    }): Promise<ToolCallResult> {
        try {
            // Socket-BE API接続確認
            if (!this.world) {
                return { success: false, message: "World not available. Ensure Minecraft is connected." };
            }
    
            // 引数の基本検証
            if (!args || typeof args !== 'object') {
                return this.createErrorResponse('Invalid arguments provided');
            }
    
            if (!this.validateArgs(args)) {
                return this.createErrorResponse('Missing required arguments: centerX, centerY, centerZ, radius, height');
            }
    
            const { 
                action = 'build',
                centerX, 
                centerY, 
                centerZ, 
                radius, 
                height, 
                material = 'minecraft:stone', 
                hollow = false,
                axis = 'y'
            } = args;
            
            // actionパラメータをサポート(現在は build のみ)
            if (action !== 'build') {
                return this.createErrorResponse(`Unknown action: ${action}. Only 'build' is supported.`);
            }
            
            // 座標の整数化
            const center = {
                x: this.normalizeCoordinate(centerX),
                y: this.normalizeCoordinate(centerY),
                z: this.normalizeCoordinate(centerZ)
            };
            
            const radiusInt = Math.round(radius);
            const heightInt = Math.round(height);
            
            // パラメータ検証
            if (radiusInt < 1 || radiusInt > 30) {
                return this.createErrorResponse('Radius must be between 1 and 30');
            }
            
            if (heightInt < 1 || heightInt > 50) {
                return this.createErrorResponse('Height must be between 1 and 50');
            }
            
            if (!['x', 'y', 'z'].includes(axis)) {
                return this.createErrorResponse('Axis must be x, y, or z');
            }
            
            // 座標検証(軸に応じて範囲をチェック)
            let minX = center.x, maxX = center.x;
            let minY = center.y, maxY = center.y;
            let minZ = center.z, maxZ = center.z;
            
            if (axis === 'y') {
                minX = center.x - radiusInt; maxX = center.x + radiusInt;
                minY = center.y; maxY = center.y + heightInt - 1;
                minZ = center.z - radiusInt; maxZ = center.z + radiusInt;
            } else if (axis === 'x') {
                minX = center.x; maxX = center.x + heightInt - 1;
                minY = center.y - radiusInt; maxY = center.y + radiusInt;
                minZ = center.z - radiusInt; maxZ = center.z + radiusInt;
            } else if (axis === 'z') {
                minX = center.x - radiusInt; maxX = center.x + radiusInt;
                minY = center.y - radiusInt; maxY = center.y + radiusInt;
                minZ = center.z; maxZ = center.z + heightInt - 1;
            }
            
            if (!this.validateCoordinates(minX, minY, minZ) || 
                !this.validateCoordinates(maxX, maxY, maxZ)) {
                return this.createErrorResponse('Cylinder extends beyond valid coordinates');
            }
            
            // ブロックIDの正規化
            const blockId = this.normalizeBlockId(material);
            
            // 円柱の座標を計算
            const positions = calculateCylinderPositions(center, radiusInt, heightInt, axis as 'x' | 'y' | 'z', hollow);
            
            // ブロック数制限チェック(最適化効果を考慮)
            if (positions.length > BUILD_LIMITS.CYLINDER) {
                return this.createErrorResponse(`Too many blocks to place (maximum ${BUILD_LIMITS.CYLINDER.toLocaleString()})`);
            }
            
            try {
                // 最適化されたビルド実行
                const result = await executeBuildWithOptimization(
                    this.world,
                    positions,
                    blockId,
                    {
                        type: 'cylinder',
                        center: center,
                        radius: radiusInt,
                        height: heightInt,
                        axis: axis,
                        hollow: hollow,
                        material: blockId,
                        apiUsed: 'Socket-BE'
                    }
                );
                
                if (!result.success) {
                    return this.createErrorResponse(result.message);
                }
                
                return {
                    success: true,
                    message: result.message,
                    data: result.data
                };
            } catch (buildError) {
                return this.createErrorResponse(`Building error: ${buildError instanceof Error ? buildError.message : String(buildError)}`);
            }
    
        } catch (error) {
            return this.createErrorResponse(
                `Error building cylinder: ${error instanceof Error ? error.message : String(error)}`
            );
        }
    }
  • Input schema defining parameters for the build_cylinder tool including required coordinates, radius, height, and optional material, hollow, axis.
    readonly inputSchema: InputSchema = {
        type: 'object',
        properties: {
            action: {
                type: 'string',
                description: 'Build action to perform',
                enum: ['build'],
                default: 'build'
            },
            centerX: {
                type: 'number',
                description: 'Center X coordinate (east-west position where the cylinder will be centered)'
            },
            centerY: {
                type: 'number', 
                description: 'Bottom Y coordinate (ground level height where cylinder starts, typically 64)'
            },
            centerZ: {
                type: 'number',
                description: 'Center Z coordinate (north-south position where the cylinder will be centered)'
            },
            radius: {
                type: 'number',
                description: 'Radius in blocks (how wide the cylinder is). Thin: 2-4, Medium: 5-10, Wide: 15-30',
                minimum: 1,
                maximum: 30
            },
            height: {
                type: 'number',
                description: 'Height in blocks (how tall the cylinder is). Short: 5-10, Medium: 15-25, Tall: 30-50',
                minimum: 1,
                maximum: 50
            },
            material: {
                type: 'string',
                description: 'Block type to build with (e.g. stone, brick, concrete, wood, etc.)',
                default: 'minecraft:stone'
            },
            hollow: {
                type: 'boolean',
                description: 'Make it hollow (true) for cylinder shell/walls only, or solid (false) for full cylinder',
                default: false
            },
            axis: {
                type: 'string',
                description: 'Direction the cylinder extends: y=vertical (normal tower), x=horizontal east-west, z=horizontal north-south',
                enum: ['y', 'x', 'z'],
                default: 'y'
            }
        },
        required: ['centerX', 'centerY', 'centerZ', 'radius', 'height']
    };
  • src/server.ts:359-372 (registration)
    Instantiation of BuildCylinderTool in the tools array within the server constructor, which leads to its registration via registerModularTools() method.
      // Advanced Building ツール(高レベル建築機能)
      new BuildCubeTool(), // ✅ 完全動作
      new BuildLineTool(), // ✅ 完全動作
      new BuildSphereTool(), // ✅ 完全動作
      new BuildCylinderTool(), // ✅ 修正済み
      new BuildParaboloidTool(), // ✅ 基本動作
      new BuildHyperboloidTool(), // ✅ 基本動作
      new BuildRotateTool(), // ✅ 基本動作
      new BuildTransformTool(), // ✅ 基本動作
      new BuildTorusTool(), // ✅ 修正完了
      new BuildHelixTool(), // ✅ 修正完了
      new BuildEllipsoidTool(), // ✅ 修正完了
      new BuildBezierTool(), // ✅ 新規追加(可変制御点ベジェ曲線)
    ];
  • src/server.ts:17-17 (registration)
    Import statement for BuildCylinderTool used in server registration.
    import { BuildCylinderTool } from "./tools/advanced/building/build-cylinder";
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full burden of behavioral disclosure. It mentions 'Requires: centerX,centerY,centerZ,radius,height. Optional: axis', which hints at input requirements but lacks details on what the tool actually does (e.g., whether it modifies the world, requires permissions, has side effects, or returns any output). For a build tool with no annotations, this is a significant gap in describing behavioral traits.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is brief but could be more structured; it front-loads the purpose with synonyms but then lists parameters in a comma-separated format that might be less clear. It's not overly verbose, but the sentence 'Build CYLINDER: tower, pillar, column, chimney, pipe, tube.' could be more direct, and the parameter listing feels tacked on without full integration.

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 a build tool with 9 parameters, no annotations, and no output schema, the description is incomplete. It doesn't explain what the tool returns, how it affects the Minecraft world, or any error conditions. While the schema covers parameters well, the description fails to provide necessary context for safe and effective use by an AI agent.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the schema already documents all 9 parameters thoroughly with descriptions, defaults, and constraints. The description adds minimal value by listing required and optional parameters but doesn't provide additional meaning beyond what's in the schema (e.g., it doesn't explain parameter interactions or usage tips). Baseline 3 is appropriate when the schema does the heavy lifting.

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 as building a cylinder with synonyms like 'tower, pillar, column, chimney, pipe, tube', which helps clarify the type of structure. However, it doesn't explicitly differentiate from sibling tools like build_cube or build_sphere, though the cylinder shape is implied. The verb 'Build' is specific and the resource 'CYLINDER' is clear.

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

Usage Guidelines2/5

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

The description provides no guidance on when to use this tool versus alternatives like build_cube or build_sphere, nor does it mention any prerequisites or exclusions. It only lists required parameters without contextual usage advice, leaving the agent to infer based on the tool name alone.

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/Mming-Lab/minecraft-bedrock-mcp-server'

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