Skip to main content
Glama

get_terrain

Samples painted terrain on a grid to verify fills and paints landed where intended and to inspect inherited ground without taking a screenshot.

Instructions

Read the terrain back: sample the painted terrain on a grid.

rect: [x, y, w, h] in woxels; omit for the whole map.
samples: grid resolution per side, 2-64 (16 = 256 points).

Returns a `weights` grid, row-major from the rect's top-left. Each point is
[slot0, slot1, slot2, slot3], read directly from the splat image's RGBA
channels and summing to ~1, and `slots`: the texture each of those four
slots holds.

Slot 0 is the BASE: whatever slots 1-3 leave unclaimed shows slot 0's
texture. So [1, 0, 0, 0] means "all slot 0" — and what that looks like
depends entirely on `slots[0]`. On a new map every slot holds limestone, so
it is ground nobody chose; after fill_terrain(asset=grass) it is grass. The
weights cannot tell those apart, which is why `slots` is reported.
paint_terrain(slot=0) is accepted by the engine but never raises slot 0's
weight; fill_terrain(slot=0) replaces the base instead.

Slots 4-7 live in a second splat image, reported as weights2. All eight
weights are one blend: painting any slot takes weight from the other
seven. A slot 4-7 needs a texture (set_terrain_slot) before it is painted.

This is the only way to check terrain without a screenshot — use it to
confirm a fill or paint landed where you meant, and to see what ground you
inherited on a map you did not build.

render: also report how the GPU draws it (shader, bound textures, and at
  `at` = [x, y] the CPU and GPU weights), for ground that reads wrong.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "get_terrain"
  }
}

Input Schema

NameRequiredDescriptionDefault
atNo
rectNo
renderNo
samplesNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.5.0

TDQS

A4.9/5.0
Behavior5/5

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

With no annotations supplied, the description carries the full burden and does so: it discloses the read-only nature, the base-slot inheritance quirk, that paint_terrain(slot=0) never raises slot 0's weight, that slots 4-7 need set_terrain_slot before painting, and that all eight weights form one blend. These are non-obvious engine behaviors an agent could not infer from the schema.

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

Conciseness4/5

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

Structure is strong — one-line purpose, then parameters, then return shape, then usage guidance — and the critical scoping info is front-loaded. It runs long and the base-slot explanation is a dense paragraph, though nearly every sentence carries substantive information.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

There is no output schema, so the description must explain returns, and it does thoroughly: the weights grid layout, row-major ordering from the rect's top-left, the four-component [slot0..slot3] tuples summing to ~1, and the parallel slots array. Nothing needed to interpret the result is missing.

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

Parameters5/5

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

Schema description coverage is 0%, yet all four parameters are given meaning: rect as [x, y, w, h] in woxels with omission meaning the whole map, samples as grid resolution per side with range 2-64 and the 16=256-points example, render as adding GPU draw info, and at as the [x, y] point for CPU/GPU weight comparison.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The opening line states a specific verb and resource — 'Read the terrain back: sample the painted terrain on a grid' — which immediately distinguishes it from the mutating siblings fill_terrain, paint_terrain, and set_terrain_slot that are named in the body.

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

Usage Guidelines5/5

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

It explicitly states when to use it ('confirm a fill or paint landed where you meant', 'see what ground you inherited on a map you did not build') and names the alternative path ('the only way to check terrain without a screenshot'), plus a conditional use of the render flag for 'ground that reads wrong'.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Deploy Server

Other Tools