Skip to main content
Glama

create_encounter

Generate tactical combat encounters with positioned combatants, terrain obstacles, and environmental features for RPG sessions.

Instructions

Create a combat encounter with positioned combatants and terrain.

πŸ“‹ WORKFLOW:

  1. Generate terrain (obstacles, water, difficult)

  2. Add props (buildings, trees, cover)

  3. Place party (safe starting positions)

  4. Place enemies (tactical positions)

⚠️ CRITICAL VERTICALITY RULES:

  • z=0 means "standing on surface at (x,y)" - EVEN ON TOP OF OBSTACLES

  • If obstacles exist at (15,3), placing a unit at {x:15,y:3,z:0} = STANDING ON the obstacle

  • z>0 = FLYING/LEVITATING only. Creatures without flight condition WILL FALL!

  • Do NOT use z values to represent "standing on high ground"

βœ… CORRECT: Goblin on rock at (15,3) β†’ position: {x:15, y:3, z:0} ❌ WRONG: Goblin on rock β†’ position: {x:15, y:3, z:25} (will fall!)

πŸ”οΈ TERRAIN GENERATION RULES:

  • Obstacles should CLUSTER to form hills/mountains/caverns

  • Include SLOPES: Adjacent tiles stepping down to ground level

  • Isolated cliffs only if intentionally inaccessible

  • Water must CONNECT (rivers/streams/pools), never isolated tiles

πŸ“ PATTERN TEMPLATES (USE THESE!):

RIVER VALLEY (cliffs on sides, river in middle): obstacles: ["5,0","5,1","5,2",...,"5,19"] (west cliff), ["13,0","13,1","13,2",...,"13,19"] (east cliff) water: ["8,0","9,0","10,0","8,1","9,1","10,1",...] (3-wide river at x=8,9,10)

CANYON (two parallel walls): obstacles: ["0,5","1,5","2,5",...,"9,5"] (north wall), ["0,15","1,15","2,15",...,"9,15"] (south wall)

Example: { "seed": "battle-1", "terrain": { "obstacles": ["10,5", "11,5", "10,6"], "water": ["5,10", "5,11", "6,11"] }, "participants": [ {"id": "hero-1", "name": "Valeros", "hp": 20, "maxHp": 20, "initiativeBonus": 2, "position": {"x": 15, "y": 15, "z": 0}}, {"id": "goblin-1", "name": "Goblin Archer", "hp": 7, "maxHp": 7, "initiativeBonus": 1, "position": {"x": 10, "y": 5, "z": 0}, "isEnemy": true} ] }

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
seedYesSeed for deterministic combat resolution
participantsYes
terrainNoCRIT-003: Terrain configuration for collision
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