You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+30-6Lines changed: 30 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -392,6 +392,12 @@ The build-plan tool accepts either:
392
392
- a root object that is itself the build plan
393
393
- or a wrapper object with top-level `build_plan`
394
394
395
+
Important top-level planning fields:
396
+
-`coordMode`: `player` or `absolute`
397
+
-`origin`: in `player` mode this is a relative shift from the player; in `absolute` mode it is an explicit world origin
398
+
-`offset`: optional extra relative shift after the base origin
399
+
-`autoFix`: allows safe grounding fixes like small auto-lowers and limited support repair
400
+
395
401
Minimal example:
396
402
397
403
```json
@@ -418,20 +424,27 @@ Agents should not treat the build planner as a black box. The most important rul
418
424
419
425
-`minecraft_buildsite` returns terrain deltas relative to the player’s current block Y, not absolute world Y.
420
426
- If `maxDy` is negative, the surrounding surface is below the player. A build with floor `y=0` will float unless the plan is lowered or the player moves.
427
+
-`coordMode=absolute` is the right choice when the structure needs to stay locked to a specific world location instead of wherever the player happens to be standing.
428
+
- If `coordMode=absolute` is used without `origin`, the planner falls back to the player’s block position and reports that fallback in `repairs`.
421
429
-`clearPercent` is headroom above sampled surface columns, not proof that the terrain is flat.
422
430
- The planner clamps relative X/Z into `[-32, 32]` and relative Y into `[-24, 24]`. If a plan is too large or too far away, the result includes repairs saying it was clamped into the safe build window.
423
431
-`steps` should be used for phased builds like foundation -> shell -> roof -> details.
424
432
-`clear` volumes remove space before building and use the same bounds formats as cuboids, but without a block id.
425
433
-`rotate` accepts `0`, `90`, `180`, `270`, `cw`, and `ccw`, and the result reports the final normalized value in `appliedRotation`.
426
434
-`phaseCount` reports how many direct-operation phases were compiled from `clear`, `cuboids`, `blocks`, and `steps`.
427
-
- The planner can auto-add support pillars using `minecraft:stone_bricks`, but only up to 24 lowest columns. Beyond that, the agent should add an explicit foundation or split the build into phases.
435
+
- The planner now returns structured `issues` identifying floating cuboids or block targets, their `gapBelow`, and a `suggestedY` to ground them correctly.
436
+
- The planner only adds support pillars for real unsupported columns and caps auto-support at 24 columns.
437
+
- If more than 80% of the lowest build columns are already within 2 blocks of solid ground and `autoFix=true`, the planner can auto-lower the whole build instead of spamming pillars.
438
+
-`resolvedOrigin` in the result tells you the exact world origin that was actually used.
439
+
-`autoFixAvailable` tells you whether the planner believes a safe grounding fix exists.
428
440
429
441
If an agent gets a support-pillar failure, the correct response is usually:
430
442
431
443
1. Re-read `minecraft_buildsite`
432
-
2. Lower the build or move the player to the intended surface level
433
-
3. Add a foundation phase in `steps`
434
-
4. Retry with a grounded plan
444
+
2. Inspect `issues` and `suggestedY`
445
+
3. Lower the build or move the player to the intended surface level
446
+
4. Add a foundation phase in `steps`
447
+
5. Retry with a grounded plan
435
448
436
449
Do not keep retrying the same floating `y=0` structure and assume the JSON schema is wrong.
437
450
@@ -445,9 +458,20 @@ For terrain-sensitive or unfamiliar builds, agents should use:
445
458
-`repairs`
446
459
-`appliedRotation`
447
460
-`phaseCount`
461
+
-`resolvedOrigin`
462
+
-`issues`
448
463
-`previewCommands`
449
-
4. Revise the plan if needed
450
-
5. Then call `minecraft_execute_build_plan`
464
+
4. Save the returned `planId` if the preview looks good
465
+
5. Revise the plan if needed
466
+
6. Then call `minecraft_execute_build_plan`
467
+
468
+
Best practice is:
469
+
470
+
```json
471
+
{ "executePlanId": "plan-..." }
472
+
```
473
+
474
+
That makes execute run the exact cached preview instead of recompiling a fresh variant.
451
475
452
476
`minecraft_preview_build_plan` uses the same planner and command validation as the real build path, but it does not mutate the world and does not create an undo batch.
Copy file name to clipboardExpand all lines: run-mcp-sidecar-node.js
+64-16Lines changed: 64 additions & 16 deletions
Original file line number
Diff line number
Diff line change
@@ -302,14 +302,20 @@ const TOOLS = {
302
302
inputSchema: objectSchema(),
303
303
},
304
304
minecraft_preview_build_plan: {
305
-
description: "Compile and validate a structured voxel build plan without executing it, returning repairs, preview commands, rotation, and phase data.",
305
+
description: "Compile and validate a structured voxel build plan without executing it, returning previewCommands, planId, resolvedOrigin, issues, repairs, rotation, and phase data.",
306
306
method: "POST",
307
307
path: "/v1/actions/preview_build_plan",
308
308
inputSchema: {
309
309
type: "object",
310
-
description: "Either provide build_plan explicitly or pass the build_plan object as the root arguments object.",
310
+
description: "Either provide build_plan explicitly or pass the build_plan object as the root arguments object. Supports coordMode=player|absolute, explicit origin, offset, autoFix, clear, cuboids, blocks, and steps.",
description: "Compile and execute a structured voxel build plan using the mod's planner, with validation, rotation, support repair, and undo-aware batching.",
328
+
description: "Compile and execute a structured voxel build plan using the mod's planner, with validation, absolute/player origins, support diagnostics, preview parity via planId, and undo-aware batching.",
323
329
method: "POST",
324
330
path: "/v1/actions/execute_build_plan",
325
331
inputSchema: {
326
332
type: "object",
327
-
description: "Either provide build_plan explicitly or pass the build_plan object as the root arguments object.",
333
+
description: "Either provide build_plan explicitly, pass the build_plan object as the root arguments object, or send executePlanId/planId from minecraft_preview_build_plan to execute the exact cached preview unchanged.",
@@ -729,6 +743,10 @@ function buildResponseFieldsForTool(name) {
729
743
{name: "summary",description: "Planner summary of the build."},
730
744
{name: "appliedRotation",description: "Final normalized rotation."},
731
745
{name: "phaseCount",description: "Number of compiled direct-operation phases."},
746
+
{name: "resolvedOrigin",description: "Exact world origin the planner actually used."},
747
+
{name: "issues",description: "Structured floating/grounding issues with cuboid names, gaps, and suggestedY."},
748
+
{name: "autoFixAvailable",description: "Whether the planner believes a safe grounding fix exists."},
749
+
{name: "planId",description: "Cached preview id that execute can reuse unchanged via executePlanId."},
732
750
{name: "previewCommands",description: "The exact validated Minecraft commands that would run."},
733
751
];
734
752
case"minecraft_execute_build_plan":
@@ -742,6 +760,10 @@ function buildResponseFieldsForTool(name) {
742
760
{name: "summary",description: "Planner summary of what was built or attempted."},
743
761
{name: "appliedRotation",description: "Final normalized rotation used: 0, 90, 180, or 270."},
744
762
{name: "phaseCount",description: "How many direct-operation phases the planner compiled."},
763
+
{name: "resolvedOrigin",description: "Exact world origin the planner actually used."},
764
+
{name: "issues",description: "Structured floating/grounding issues for failed or revised builds."},
765
+
{name: "autoFixAvailable",description: "Whether the planner believed a safe grounding fix was available."},
766
+
{name: "planId",description: "Preview cache id if the build was executed from a cached preview."},
745
767
];
746
768
default:
747
769
return[];
@@ -818,7 +840,10 @@ function buildBuildPlanGuide() {
818
840
"## Common Top-Level Fields",
819
841
"",
820
842
"- `summary`: short description of the structure",
821
-
"- `origin` or `offset`: optional relative origin shift",
843
+
"- `coordMode`: `player` or `absolute`",
844
+
"- `origin`: explicit origin. In `player` mode it is a relative shift from the player. In `absolute` mode it is a real world origin.",
845
+
"- `offset`: optional extra relative shift applied after the base origin",
846
+
"- `autoFix`: whether the planner may auto-lower near-ground builds and add limited support repair",
822
847
"- `rotate`: `0`, `90`, `180`, `270`, `cw`, or `ccw`",
823
848
"- `palette`: aliases for block ids, useful for custom mod blocks",
824
849
"- `clear`: volumes to clear before building",
@@ -828,11 +853,13 @@ function buildBuildPlanGuide() {
828
853
"",
829
854
"## Coordinate Rules",
830
855
"",
831
-
"- Coordinates are relative to the active player unless you intentionally offset them.",
856
+
"- `coordMode=player` means the plan is relative to the active player.",
857
+
"- `coordMode=absolute` means `origin` is an explicit world coordinate and cuboid/block coordinates are relative to that absolute origin.",
858
+
"- If `coordMode=absolute` is used without `origin`, the planner falls back to the player's current block position and reports that fallback in `repairs`.",
832
859
"- Positive `x` is east, positive `y` is up, positive `z` is south.",
833
860
"- Keep small test structures close to the origin, for example between `-8` and `8` on x/z.",
834
861
"- The planner clamps X/Z into `[-32, 32]` and Y into `[-24, 24]`. If you exceed that window, the plan is repaired and reported as clamped.",
835
-
"- `origin`/`offset` still remain relative. They do not switch the planner into unrestricted absolute world coordinates.",
862
+
"- Absolute `origin` is not clamped into the player's safe window. Relative cuboid/block coordinates still are.",
836
863
"",
837
864
"## Aligning The Build With Real Terrain",
838
865
"",
@@ -841,6 +868,7 @@ function buildBuildPlanGuide() {
841
868
"- In that situation, a plan with its floor at relative `y=0` starts nine blocks above nearby surface and will likely trigger support repairs or failure.",
842
869
"- Best practice: move the player to the intended build level or lower the foundation/floor phase to match the surface you actually want to build on.",
843
870
"- If `clearPercent` is low, do not brute-force retries. Either choose another spot, clear space explicitly, or use a phased plan.",
871
+
"- If you want a structure at a stable world location, prefer `coordMode=absolute` with an explicit `origin` rather than relying on wherever the player happens to be standing.",
844
872
"",
845
873
"## Accepted Geometry Forms",
846
874
"",
@@ -988,11 +1016,24 @@ function buildBuildPlanGuide() {
988
1016
"",
989
1017
"## Foundations And Support Pillars",
990
1018
"",
991
-
"- After compiling placements, the planner checks whether the lowest occupied columns have solid terrain below them.",
992
-
"- If the build is nearly grounded, it can auto-add support pillars using `minecraft:stone_bricks`.",
993
-
"- Auto-support is capped at 24 columns. If more would be needed, the planner rejects the build and tells the agent to add an explicit foundation or split the build into phases.",
1019
+
"- After compiling placements, the planner checks the lowest support targets, not just the raw command list.",
1020
+
"- It returns structured `issues` identifying which cuboids or block targets are floating, their `gapBelow`, and a `suggestedY` for grounding.",
1021
+
"- Only columns with real air/fluid gaps below them are considered for auto-support pillars.",
1022
+
"- If more than 80% of the lowest-layer columns are within 2 blocks of valid ground and `autoFix=true`, the planner can auto-lower the whole build instead of spamming pillars.",
1023
+
"- Auto-support pillars use `minecraft:stone_bricks` and are capped at 24 columns.",
994
1024
"- If there is no valid solid ground below some lowest columns at all, the planner rejects the build and tells the agent to lower the build or add a foundation.",
995
-
"- This is why repeated retries with the same floating `y=0` plan are the wrong response. Fix the base Y or add a foundation phase instead.",
1025
+
"- Repeated retries with the same floating `y=0` plan are the wrong response. Fix the base Y, add a foundation phase, or use preview issues plus `suggestedY` to revise the plan.",
@@ -1008,9 +1049,12 @@ function buildBuildPlanGuide() {
1008
1049
"",
1009
1050
"1. `minecraft_buildsite`",
1010
1051
"2. `minecraft_preview_build_plan`",
1011
-
"3. Inspect `repairs`, `appliedRotation`, `phaseCount`, and `previewCommands`",
1012
-
"4. Revise if needed",
1013
-
"5. `minecraft_execute_build_plan` only after the preview looks sane",
1052
+
"3. Inspect `repairs`, `appliedRotation`, `phaseCount`, `resolvedOrigin`, `issues`, and `previewCommands`",
1053
+
"4. Keep the returned `planId` if the preview is good",
1054
+
"5. Revise if needed",
1055
+
"6. Execute either the same payload again or, preferably, `minecraft_execute_build_plan {\"executePlanId\":\"...\"}` so the exact cached preview runs unchanged",
1056
+
"",
1057
+
"The `planId` path is the strongest option when preview parity matters because preview and execute then use the same compiled command list.",
1014
1058
"",
1015
1059
"## Failure Prevention",
1016
1060
"",
@@ -1032,6 +1076,10 @@ function buildBuildPlanGuide() {
1032
1076
"- `summary`: human-readable summary of the compiled build",
1033
1077
"- `appliedRotation`: final normalized rotation",
1034
1078
"- `phaseCount`: number of compiled direct-operation phases",
1079
+
"- `resolvedOrigin`: the world origin actually used after coordMode/origin fallback resolution",
1080
+
"- `issues`: structured floating/grounding issues for failing or revised builds",
1081
+
"- `autoFixAvailable`: whether the planner believes a safe grounding fix is available",
1082
+
"- `planId`: returned by preview so execute can run the exact cached plan",
0 commit comments