Skip to content
Star

Dungeondraft tool controls tools

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.

list_tool_controls

List a Dungeondraft tool's UI controls — its real, operable surface.

Every tool exposes its buttons, dropdowns, toggles and colour pickers as named controls. This shows their ids and types, which is what tool_action and set_tool_option operate on.

tool: e.g. 'SelectTool', 'PrefabTool', 'FloorShapeTool', 'MaterialBrush', 'MapSettings', 'Environment', 'LightTool', 'TraceImage'.

ParameterTypeDefault
tool requiredstring

tool_action

Press a button control on a Dungeondraft tool.

This is the escape hatch for capabilities with no dedicated tool. Notably SelectTool's batch operations, which act on the current selection (use select_elements first): 'Copy', 'Paste', 'Mirror', 'Lock', 'Separate', 'Merge Walls', 'Make Prefab', 'Delete'.

Prefer a purpose-built tool where one exists — they validate input and return ids. Call list_tool_controls to see what a tool offers.

Buttons that need a selection will report being disabled rather than silently doing nothing.

Merge Walls can join compatible manual walls (draw_wall type=1). Walls with mounted doors/windows are refused because native merging deletes portals on absorbed walls. Generic actions do not enter bridge undo history.

ParameterTypeDefault
tool requiredstring
control requiredstring

set_tool_option

Set a value on a Dungeondraft tool's control.

Pass exactly one of: item text of an entry in an OptionButton or ItemList, by its visible name item_index that entry's POSITION instead. Texture selectors and FloorShapeTool's SmartTileId have blank labels, so they cannot be named by text at all item_metadata substring of an entry's metadata. A texture menu item holds its ASSET PATH there, so this picks a texture by path — which is usually what you actually mean color '#rrggbb' for a colour picker. Some colour controls wrap the picker in a container; this reaches through it pressed true/false for a toggle, e.g. 'Bevel', 'Shadow' value a number for a slider

Call list_tool_controls first — control ids and types vary per tool, and the value kind must match the control.

This is the DIAGNOSTIC surface, for controls with no typed tool of their own. Where a typed tool exists, use it: it validates, reads its result back and is undoable, none of which this is.

ParameterTypeDefault
tool requiredstring
control requiredstring
itemstring""
colorstring""
pressedboolean | nullnull
valuenumber | nullnull
item_indexinteger | nullnull
item_metadatastring""

select_tool

Select a tool in Dungeondraft's UI, as clicking its button would.

Mostly useful for leaving the editor on a sensible tool when you are done, so the person who takes over is not looking at whichever tool your last call happened to need.

tool: exact tool name, e.g. "ObjectTool", "SelectTool", "WallTool".

ParameterTypeDefault
tool requiredstring

get_tool_layer

Read which layer a tool draws on, and the range of layers that exist.

Layers stack: lower numbers sit under higher ones. Values run from -500 to 900 in steps of 100 (min, max and step in the response), plus extra_layers such as the Unofficial Patch's 1100 when present. 100 is the default for every tool except MaterialBrush, which starts at -400 so floors sit under everything.

tool: e.g. "ObjectTool", "PathTool", "PatternShapeTool". A tool without layers is refused, and the error lists the ones that have them.

ParameterTypeDefault
tool requiredstring

set_tool_layer

Set which layer a tool draws on, for everything it places afterwards.

Use it to put a rug under furniture, a bridge over water, or roots below the ground. Call get_tool_layer first to see the current layer and the range.

Check applied in the response: Dungeondraft silently keeps its current layer if it will not accept the one you asked for, and the response reports what the tool actually holds rather than what you requested.

tool: e.g. "ObjectTool", "PathTool", "PatternShapeTool".

layer: layer VALUE, a multiple of 100 from -500 to 900 — not a menu index — or 1100 when the Unofficial Patch is loaded.

ParameterTypeDefault
tool requiredstring
layer requiredinteger