image_to_grid
Downsample a picture into LEGO colour-letter rows for fill_layers; crop to subject, set cell aspect ratio, and map transparent pixels to '.'.
Instructions
Downsample a picture into rows of colour letters using LEGO colours, ready for fill_layers. crop = [left, top, right, bottom] fractions (0-1) to focus on the subject. cell sets the cell's aspect ratio when height is omitted: 'stud' for top-down maps, 'brick' or 'plate' for upright walls. Transparent pixels become '.'.
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": {
"image_path": "<image_path>",
"width": "<width>"
},
"name": "image_to_grid"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| cell | No | stud | |
| crop | No | ||
| width | Yes | ||
| height | No | ||
| palette | No | ||
| image_path | Yes | ||
| max_colors | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |