- Knownframe
- battlemap-mcp
- Docs
- v1.3.1
- Dungeondraft tool controls
Dungeondraft tool controls
Generated from battlemap-mcp v1.3.1. 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.
| Parameter | Type | Default | Description |
|---|---|---|---|
tool required | string | e.g. 'SelectTool', 'PrefabTool', 'FloorShapeTool', 'MaterialBrush', 'MapSettings', 'Environment', 'LightTool', 'TraceImage'. |
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.
| Parameter | Type | Default | Description |
|---|---|---|---|
tool required | string | ||
control required | string |
set_tool_option
Set a value on a Dungeondraft tool's control.
Pass exactly one of: item, item_index, item_metadata, color, pressed or value.
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.
| Parameter | Type | Default | Description |
|---|---|---|---|
tool required | string | ||
control required | string | ||
item | string | "" | text of an entry in an OptionButton or ItemList, by its visible name |
color | string | "" | '#rrggbb' for a colour picker. Some colour controls wrap the picker in a container; this reaches through it |
pressed | boolean | null | null | true/false for a toggle, e.g. 'Bevel', 'Shadow' |
value | number | null | null | a number for a slider |
item_index | integer | null | null | 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 | string | "" | 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 |
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.
| Parameter | Type | Default | Description |
|---|---|---|---|
tool required | string | exact tool name, e.g. "ObjectTool", "SelectTool", "WallTool". |
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.
| Parameter | Type | Default | Description |
|---|---|---|---|
tool required | string | e.g. "ObjectTool", "PathTool", "PatternShapeTool". A tool without layers is refused, and the error lists the ones that have them. |
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.
| Parameter | Type | Default | Description |
|---|---|---|---|
tool required | string | e.g. "ObjectTool", "PathTool", "PatternShapeTool". | |
layer required | integer | layer VALUE, a multiple of 100 from -500 to 900 — not a menu index — or 1100 when the Unofficial Patch is loaded. |