terrain
Set up terrain auto-tiling on a tilemap layer (Godot-compatible peering). Modes: sides (16 tiles, N E S W), blob (47 tiles, sides + corners), corners (dual grid, 4 corners). Actions: create (first terrain + mode), set_mode, add / remove (alias: delete) / edit / move (terrain priority), list, gene...
This record as markdown: /tools/pixmith-mcp/terrain.md
What terrain does on Pixmith
AI agents call terrain to permanently remove resources in Pixmith, typically in cleanup and lifecycle workflows. It does its job in a single call, and there is no undo.
| Parameter | Type | Required | Description |
|---|---|---|---|
to | integer | — | move: new priority position (0 = highest). |
doc | string | — | Document id (see doc_list); optional when only one document is open. |
mask | integer | — | set_tile: neighbor mask (sides: N=1 E=2 S=4 W=8; blob: N=1 NE=2 E=4 SE=8 S=16 SW=32 W=64 NW=128; corners: TL=1 TR=2 BR=4 BL=8); -1 removes the tile's terrain da |
mode | string | — | create/set_mode: auto-tiling mode. |
name | string | — | create/add/edit: terrain name. |
seed | integer | — | set_options: random seed for weighted variants. |
tile | integer | — | set_tile/get_tile: tile index. |
color | string | — | create/add/edit: terrain color (for display and Godot). |
frame | integer | — | Frame for clear_overrides/missing (default: active). |
layer | object | — | Tilemap layer (default: active). |
peers | object | — | set_tile: terrain of each ring direction, e.g. {"n": 1, "e": 0} (n ne e se s sw w nw; 0 = empty). |
action | string | Yes |
Parameters from the server's own tool schema.
Why terrain is rated Critical
An AI agent that decides to call terrain doesn't hesitate, doesn't double-check, and doesn't stop at one. Whatever it removes from Pixmith is gone. There is no undo for destructive operations.
Risk signalsHigh parameter count (17 properties) · Bulk/mass operation — affects multiple targets
Attacks that exploit this kind of access
The rule that runs terrain safely
PolicyLayer is an MCP gateway: it sits between your AI agents and Pixmith, and checks every tool call against a rule you set before the call runs. Nothing changes on the server itself. For terrain, this is the rule to start with:
terrain is removed from the agent's tool list entirely, so the agent never calls it. The rest of the server keeps working.
The button opens the PolicyLayer dashboard: create your workspace, connect Pixmith, apply this rule, and every terrain call is checked against it from then on.
Questions about terrain
Set up terrain auto-tiling on a tilemap layer (Godot-compatible peering). Modes: sides (16 tiles, N E S W), blob (47 tiles, sides + corners), corners (dual grid, 4 corners). Actions: create (first terrain + mode), set_mode, add / remove (alias: delete) / edit / move (terrain priority), list, generate_template (append a labeled template tileset for the mode; reduced = only flip/rotation representatives), assign_masks (give tiles 1.. the template's masks in order), set_tile (a tile's mask / terrain / peers / symmetry / weight), get_tile, set_options (edge_same, seed), rebuild (recompute every cell), clear_overrides, missing (cells that had no matching tile, read-only report). Paint with terrain_paint. Works on isometric tilemap layers too (modes sides and blob; the dual-grid corners mode needs square tiles; generate_template draws diamond-shaped templates at the tiles' pivots). It is categorised as a Destructive tool in the Pixmith MCP Server, which means it can permanently delete or destroy data. Block by default and require explicit approval.
terrain accepts 12 parameters: to, doc, mask, mode, name, seed, tile, color, frame, layer, peers, action. Required: action. The full parameter table on this page comes from the server's own tool schema.
Register the Pixmith MCP server in PolicyLayer and add a rule for terrain: allow, deny, rate-limit, or require approval. Point your MCP client at the PolicyLayer proxy URL and the rule is enforced on every call, before it reaches Pixmith. Nothing to install.
terrain is a Destructive tool with critical risk. Critical-risk tools should be blocked by default and only enabled with explicit human approval.
Yes. Add a rate_limit block to the terrain rule in your PolicyLayer policy. For example, setting max: 10 and window: 60 limits the tool to 10 calls per minute. Rate limits are tracked per agent session and reset automatically.
Set action: deny in the PolicyLayer policy for terrain. The AI agent will receive a policy violation error and cannot call the tool. You can also include a reason field to explain why the tool is blocked.
terrain is provided by the Pixmith MCP server (pixmith-mcp). PolicyLayer sits as a proxy in front of this server to enforce policies before tool calls reach the server.
More on Pixmith, and thousands of servers like it.
Across the catalogue