Skip to main content
Glama

generate_terrain_patch

Create procedurally generated terrain patches for RPG encounters using biome presets like forest, cave, village, dungeon, swamp, or battlefield with configurable density and patterns.

Instructions

Generate a terrain patch using procedural noise or preset patterns. Much easier than placing individual tiles - LLM describes the area and this tool generates it.

Biome Presets:

  • forest: Trees (climbable props), undergrowth (difficult terrain), paths

  • cave: Rocky walls (obstacles), stalactites (props), pools (water)

  • village: Buildings (obstacle clusters), roads (clear), market stalls (props)

  • dungeon: Walls (obstacles), rubble (difficult), traps (hazards)

  • swamp: Water, lily pads (props), dead trees, difficult terrain

  • battlefield: Barricades, craters (difficult), debris (props)

Density: 0.1 (sparse) to 1.0 (dense)

Example - Generate a forest clearing: { "encounterId": "encounter-1", "biome": "forest", "origin": { "x": 10, "y": 10 }, "width": 20, "height": 20, "density": 0.4, "seed": "goblin-ambush", "clearCenter": true }

Example - Dungeon room: { "encounterId": "encounter-1", "biome": "dungeon", "origin": { "x": 0, "y": 0 }, "width": 15, "height": 12, "density": 0.6, "seed": "throne-room" }

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
encounterIdYesThe ID of the encounter
biomeYesBiome preset to use
originYesTop-left corner of the patch
widthYesWidth of the patch in tiles
heightYesHeight of the patch in tiles
densityNoHow densely packed (0.1=sparse, 1.0=very dense)
seedNoSeed for reproducible generation
clearCenterNoKeep the center area clear (for player spawn)
patternNoUse a terrain pattern template instead of biome generation
sessionIdNo

Other 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/Mnehmos/rpg-mcp'

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