set_tool_option
Set a control value on a Dungeondraft tool by item, index, metadata, color, pressed state, or slider number when no typed control tool exists; verify IDs and types with list_tool_controls first.
Instructions
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.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"tool": "<tool>",
"control": "<control>"
},
"name": "set_tool_option"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| item | No | ||
| tool | Yes | ||
| color | No | ||
| value | No | ||
| control | Yes | ||
| pressed | No | ||
| item_index | No | ||
| item_metadata | No |