- Knownframe
- battlemap-mcp
- Docs
- Tool reference
Tool reference
Generated from the battlemap-mcp server at a020c64. Your assistant gets these same names, descriptions and parameters from the server when it connects; the server is named battlemap, so a client may show a tool as battlemap:ping or similar.
Most tools need an open map. Coordinates are woxels: 256 woxels make one tile, the origin is the top left, and y grows downward. Rectangles are [x, y, w, h] and rotation is in degrees. See working with maps.
Connection and setup
pingCheck the bridge is up, and whether it is the bridge in this package.get_statusReport the current map: whether one is open, its size and center in woxels,inspect_dungeondraft_installationReport bridge-install health; by default, no token or live connection is used.install_dungeondraft_bridgeInstall or update the bundled bridge mod in Dungeondraft's mods folder.set_verboseTurn per-command log bracketing on or off inside Dungeondraft.log_markerWrite a line into Dungeondraft's log to separate phases of a test run.
Assets and packs
list_asset_categoriesList asset categories, with how many assets each actually holds.list_asset_packsWhich asset packs are installed, and which this map can actually use.list_assetsList asset paths in a category, optionally filtered by a case-insensitive substring.search_pack_contentsSearch INSIDE every installed asset pack, including packs this map lacks.preview_assetsLOOK at candidate assets before committing to one. Read-only.prepare_map_with_packsCopy the open map into one that INCLUDES asset packs, and open it.list_prefabsList Dungeondraft's pre-composed prefabs — furnished groups, ready to place.
Walls, rooms and floors
build_roomBuild a room in one call: a looped wall AND a matching floor on the SAME path.draw_wallDraw a wall through a list of [x, y] woxel points. Returns the new element id.merge_wallsJoin two matching open walls sharing one endpoint, in ONE undo step.add_portalAdd a door/window portal at a woxel position. Returns the new element id.add_roofAdd a roof from its RIDGE LINE. Returns the new element id.add_floorDraw a solid floor shape — the bordered room floors a built map is made of.place_patternPlace a tiled floor/pattern shape (the Building Tool's "Floor" / Pattern Shape).generate_dungeonRun Dungeondraft's own procedural generator: a whole layout in one call.generator_optionsRead or set the Map Wizard's generator dials.
Objects, prefabs and text
place_objectPlace an object (prop) on the current map. Returns the new element id.place_objectsPlace many objects at chosen positions in ONE call and ONE undo step.scatter_objectsScatter objects randomly over a rectangular area, with jittered scale and rotation.place_prefabPlace one of Dungeondraft's pre-composed prefabs by name.modify_objectModify an existing object's scale, rotation (degrees), color, shadowduplicate_objectDuplicate an object by id, offset by (dx, dy) woxels. Returns the new element id.add_textAdd a text label at a woxel position. Returns the new element id and size.
Terrain, paths, water and caves
set_terrain_slotAssign a Terrain asset to a terrain slot index so it can be filled/painted with that slot.fill_terrainFlood-fill the whole current level with a terrain slot.fill_regionFill only a region with a terrain slot (e.g. floor a single room), in woxel coords.paint_terrainPaint a soft circular terrain brush of a slot at a woxel position.paint_pathPaint a continuous terrain stroke (a road/trail) along a polyline in one call.paint_materialPaint a MATERIAL patch along a brush stroke. Returns what it painted.get_terrainRead the terrain back: sample the painted terrain on a grid.set_terrain_blendingChoose how terrain slots blend into one another on this level.repair_terrainRebuild a level's terrain splat when the engine dropped it. Destructive.draw_pathDraw a path/road/river through a list of [x, y] woxel points. Returns the new element id.add_waterAdd a body of water — a pond, pool, river bend, moat, or flooded room.set_water_styleStyle this level's water: what KIND of water it is. Returns the result.dig_caveCarve a cave along a path with the Cave Brush (the dig/blast tool).get_caveRead the selected level's cave floor/entrance cell counts and actual colours.set_cave_entranceOpen or restore a circular section of cave border, as one undoable edit.clear_cavesWipe the entire cave layer back to solid rock.
Lighting and map style
add_lightAdd a light at a woxel position. Returns the new element id.set_ambient_lightSet the map's ambient light colour — the single biggest lever on mood.get_map_styleRead map-wide building wear and grid style from the world's actual textures.set_map_styleSet optional finishing effects across the map, as one undoable edit.set_trace_imagePut a reference image under the map to trace over. Returns what applied.
Inspect and edit elements
list_elementsList elements currently on the map with their ids, positions, rotation, scale and asset.get_elementGet details (kind, position, rotation, scale, asset) for a single element by id.get_composition_snapshotDescribe the current map's spatial structure for generation or review.move_elementMove any element to a new woxel position by id.move_elementsMove many elements by the same offset, in one call and ONE undo step.delete_elementDelete any element from the map by id. Reversible with undo().delete_elementsDelete many elements in ONE call and ONE undo step. Reversible with undo().select_elementsSelect the given element ids in Dungeondraft's UI (replaces the current selection).clear_selectionClear the current selection in Dungeondraft.get_recent_nodesList the ids Dungeondraft has assigned to nodes it created, newest last.
Validation
validate_sceneCheck that the map has ground and that its light has causes. Read-only.validate_floorplanCheck a floorplan's structure BEFORE furnishing it. Read-only.validate_placementsFind objects that intrude on the architecture. Read-only.
Maps, levels and files
open_mapOpen a .dungeondraft_map file, replacing whatever is currently open.save_mapSave the map. Use this often — it is how work survives a crash.get_save_directoryWhere save_map writes, and whether that directory exists.set_save_directorySet the directory save_map writes into. Pass "" to clear it.set_map_sizeResize the current map, in TILES (a tile is 256 woxels).list_levelsList the map's levels (floors) with their index, id and label, plus the current index.add_levelAdd a new level (floor) to the map. Returns its id and label.set_levelSwitch the active level (floor) by its **id** (see list_levels).delete_levelDelete a level (floor) by its id (see list_levels). Not undoable.get_snap_settingsReport the grid the user snaps to. Read-only.inspect_map_fileSummarise a .dungeondraft_map file without opening it. Read-only.export_dd2vttWrite the open map as a Universal VTT file (.dd2vtt) for Foundry, Roll20,import_dd2vttRebuild a Universal VTT export (.dd2vtt) on the open map.
Camera, screenshots and exports
screenshotCapture the current Dungeondraft window (the on-screen view) and return it as an image.fit_elementsFrame the whole map, or a group of elements, then screenshot() to see it.focus_elementCenter the camera on an element by id (works for any kind, including text).get_cameraReport the editor camera: world-center position [x,y], zoom, and viewport size.set_cameraPan and/or zoom the editor camera. Returns the resulting camera state.export_mapRender the entire current map to a clean image (no UI) and return it.get_exportWait for an export that export_map started, and return its image.get_operationStatus of an export:stateis rendering, completed or failed.clear_capturesRemove every server-generated screenshot, export, and asset preview,
Undo and checkpoints
checkpointMark the start of a request, so all of it can be undone in one call.rollback_checkpointUndo every edit this session made since checkpoint(label), in one call.list_checkpointsOpen checkpoints: label, whose, steps since, and whether rollback still reaches them.undoReverse the LATEST undoable edit (create / delete / move / modify / terrain / cave).redoRe-apply the last edit reversed by undo().
Dungeondraft tool controls
list_tool_controlsList a Dungeondraft tool's UI controls — its real, operable surface.tool_actionPress a button control on a Dungeondraft tool.set_tool_optionSet a value on a Dungeondraft tool's control.select_toolSelect a tool in Dungeondraft's UI, as clicking its button would.get_tool_layerRead which layer a tool draws on, and the range of layers that exist.set_tool_layerSet which layer a tool draws on, for everything it places afterwards.