bricky-mcp
v0.1.0The MCP server for bricky, a compiler for LEGO® models, built for AI agents.
These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.
build_model
Run a build script, save its model, check it and render it. The script runs as ordinary Python with the user's permissions, in its own process with a time limit; that process is not a sandbox.
| Parameter | Type | Description |
|---|---|---|
script * | string | Python file defining build(), which returns a ModelBuilder or a Model. |
check | boolean | Check the model after building it. |
error | array | Rules to report as errors, such as 'overloaded-studs', or 'all' for every rule; overrides the configured levels. |
ignore | array | Rules to leave out, such as 'unbalanced-group', or 'all' for every rule; overrides the configured levels. |
max_diagnostics | Maximum diagnostics to return; defaults to the configured cap. | |
output | Where to save the model; defaults to <script>.bricky.json. | |
render | boolean | Render the model after checking it. |
views | array | Views to render: sheet (perspective, front, right and top on one image), perspective (from the south-east), perspective-south-west, perspective-north-west, perspective-north-east, front, back, left, r… |
warn | array | Rules to report as warnings, such as 'strained-studs', or 'all' for every rule; overrides the configured levels. |
render_model
Render images of a model file.
| Parameter | Type | Description |
|---|---|---|
model * | string | Path to a .bricky.json model file. |
check | boolean | Mark the elements that diagnostics name. |
clip | array | Clip the model to look inside: 'z<130' keeps what lies below 130 plates; x and y are in studs. |
error | array | Rules to report as errors, such as 'overloaded-studs', or 'all' for every rule; overrides the configured levels. |
height | integer | Image height in pixels. |
highlight | array | Elements to highlight, rendering the rest faintly: uid patterns such as 'sign*', or '@' and a function, file or file:line of the build script, such as '@roof'. |
html | boolean | Also write a standalone HTML viewer to orbit, inspect and build step by step, highlighted like the images, with the model's exports. |
ignore | array | Rules to leave out, such as 'unbalanced-group', or 'all' for every rule; overrides the configured levels. |
output | Image file to write; with several views, each file name gets the view's name added. Defaults to <model>.<view>.png beside the model, so renders keep the sheet a build rendered. | |
views | array | Views to render: sheet (perspective, front, right and top on one image), perspective (from the south-east), perspective-south-west, perspective-north-west, perspective-north-east, front, back, left, r… |
warn | array | Rules to report as warnings, such as 'strained-studs', or 'all' for every rule; overrides the configured levels. |
width | integer | Image width in pixels. |
check_model
Check a model file and report diagnostics.
| Parameter | Type | Description |
|---|---|---|
model * | string | Path to a .bricky.json model file. |
error | array | Rules to report as errors, such as 'overloaded-studs', or 'all' for every rule; overrides the configured levels. |
ignore | array | Rules to leave out, such as 'unbalanced-group', or 'all' for every rule; overrides the configured levels. |
max_diagnostics | Maximum diagnostics to return; defaults to the configured cap. | |
warn | array | Rules to report as warnings, such as 'strained-studs', or 'all' for every rule; overrides the configured levels. |
write_instructions
Write building instructions: a page that shows a model's steps in 3D.
| Parameter | Type | Description |
|---|---|---|
model * | string | Path to a .bricky.json model file. |
elements_per_step | integer | How many elements a step adds at most. |
output | HTML file to write; defaults to <model>.instructions.html beside the model. |
export_model
Export a model file for another tool, such as a BrickLink Wanted List.
| Parameter | Type | Description |
|---|---|---|
model * | string | Path to a .bricky.json model file. |
format | File format: wanted-list (a BrickLink Wanted List, to buy the parts on BrickLink). | |
output | File to write; defaults to the model's name and the format's suffix, such as <model>.wanted.xml, beside the model. |
search_parts
Search the parts catalog.
| Parameter | Type | Description |
|---|---|---|
limit | integer | Maximum number of parts to return. |
query | string | Words to match against ids, names, categories and sizes, such as 'plate 2x4' (quoted). |
shapeless | boolean | Also list the parts without a shape, which cannot be placed. |
show_part
Show everything the catalog knows about one part.
| Parameter | Type | Description |
|---|---|---|
part * | string | BrickLink item number, such as '3001'. |
output | Image file to write; defaults to <part>.png in bricky's cache folder, outside the workspace. | |
render | boolean | Also render the part, in the first color it comes in. |
search_colors
Search the catalog's colors.
| Parameter | Type | Description |
|---|---|---|
query | string | Words to match against ids, names and types, such as 'gray', or an RGB value, such as '#F2CD37', to list the nearest colors. |
explain_rule
Explain rules: the exact condition each checks, its level and its pass.
| Parameter | Type | Description |
|---|---|---|
rule | string | A rule such as 'floating-group'; every rule when omitted. |