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
Behavior4/5

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

With no annotations provided, the description carries the full burden. It effectively discloses behavioral traits: it describes the generation method (procedural noise/presets), lists biome presets with detailed components (e.g., 'forest: Trees (climbable props), undergrowth (difficult terrain), paths'), explains density scaling, and provides examples showing output behavior. It lacks details on permissions, rate limits, or error handling, but covers core functionality well.

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 appropriately sized but not optimally structured. It front-loads the purpose and usage, but the biome preset list is lengthy (6 items with details), and the examples are verbose. While informative, some details (like full example JSON) could be streamlined. Every sentence adds value, but it could be more concise for quick scanning.

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

Completeness4/5

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

Given the tool's complexity (10 parameters, no output schema, no annotations), the description is largely complete. It covers purpose, usage, parameters (with examples), and behavioral context. However, it lacks information on return values or error cases, which would be helpful since there's no output schema. The examples partially mitigate this by showing expected input structures.

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

Parameters4/5

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

The schema description coverage is high (90%), so the baseline is 3. The description adds significant value beyond the schema: it explains biome presets in detail (e.g., 'forest: Trees (climbable props)...'), clarifies density range ('0.1 (sparse) to 1.0 (dense)'), and provides two comprehensive examples that illustrate parameter usage and interactions (e.g., 'clearCenter' for player spawn). This compensates for the 10% schema gap and enhances understanding.

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 description clearly states the tool's purpose: 'Generate a terrain patch using procedural noise or preset patterns.' It specifies the verb ('generate'), resource ('terrain patch'), and method ('procedural noise or preset patterns'), distinguishing it from sibling tools like 'update_terrain' or 'generate_terrain_pattern' by focusing on patch creation rather than modification or pattern-only generation.

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

Usage Guidelines4/5

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

The description provides clear context for usage: 'Much easier than placing individual tiles - LLM describes the area and this tool generates it.' This implies when to use it (for area-based generation vs. manual tile placement) and contrasts with alternatives like 'place_prop' or 'update_terrain'. However, it does not explicitly state when not to use it or name specific sibling alternatives.

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

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