Skip to main content
Glama

boolean_mesh_op

Combine, subtract, or intersect two or more STL meshes using CSG boolean operations to cut holes, merge parts, or build complex shapes from simple primitives.

Instructions

Perform a CSG boolean operation on two or more STL meshes.

        Uses OpenSCAD's boolean engine to compute:
        - **union**: combine multiple bodies into one
        - **difference**: subtract subsequent bodies from the first
        - **intersection**: keep only the overlapping region

        Requires OpenSCAD installed on the system.

        **Use cases:**
        - Subtract a cylinder from a block to create a hole
        - Combine multiple parts into a single printable body
        - Create complex shapes from simple primitives

        :param operation: ``"union"``, ``"difference"``, or ``"intersection"``.
        :param file_paths: List of STL file paths (minimum 2).
        :param output_path: Output path (defaults to a temp file).
        :returns: Dict with result path, operation, and triangle count.

INLINE 3D STAGE: on success this tool opens Kiln's interactive 3D stage — an inline viewer panel the user can orbit, zoom, and turn over — in hosts that render MCP Apps panels (Kiln's hosted connection attaches a browser stage link for hosts that don't). Oversized meshes are decimated automatically for the stage; the PNG preview is the floor, not the whole experience.

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": {
      "operation": "<operation>",
      "file_paths": "<file_paths>"
    },
    "name": "boolean_mesh_op"
  }
}

Input Schema

NameRequiredDescriptionDefault
operationYes``"union"``, ``"difference"``, or ``"intersection"``.
file_pathsYesList of STL file paths (minimum 2).
output_pathNoOutput path (defaults to a temp file). Default: "".

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changedv1.5.1
    • addedInput schema / properties / file_paths / description
      Added value: +"List of STL file paths (minimum 2)."
    • addedInput schema / properties / operation / description
      Added value: +"``\"union\"``, ``\"difference\"``, or ``\"intersection\"``."
    • changedInput schema / properties / output_path / description
      Previous value: -"Default: \"\"."New value: +"Output path (defaults to a temp file). Default: \"\"."
  2. Changed2 schema fields changedv1.5.0
    • removedInput schema / properties / output_path / default
      Removed value: -""
    • addedInput schema / properties / output_path / description
      Added value: +"Default: \"\"."
  3. First observedv0.1.0

TDQS

A3.8/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Beyond the annotations, the description discloses the OpenSCAD dependency, the default temp output behavior, the returned fields, and the inline 3D stage behavior, including automatic decimation for oversized meshes. It does not explain failure modes or whether existing output files are overwritten, but it provides substantial behavioral context for a mutation tool.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The definition is front-loaded with purpose, then operation semantics, requirements, use cases, parameters, return shape, and stage behavior. It is readable and well organized, though the parameter lines largely duplicate the schema and could be trimmed without losing information.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a three-parameter CSG tool with full schema coverage and no output schema, the description covers purpose, operation meanings, dependency requirements, return values, and the inline viewer behavior. It is nearly complete, but it omits error handling, overwrite behavior for output_path, and any input-preservation guarantee.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so the baseline is 3, but the description adds real meaning for the operation parameter by explaining that union combines bodies, difference subtracts subsequent bodies from the first, and intersection keeps only overlap. It does not add much for file_paths or output_path beyond what the schema already says.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description opens with a specific verb and resource: 'Perform a CSG boolean operation on two or more STL meshes,' and it enumerates union, difference, and intersection. This is much clearer than a tautology, but it does not explicitly distinguish the tool from nearby mesh-combination siblings such as merge_stl or merge_mesh_files.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description gives useful use cases (creating holes, combining parts, building complex shapes) and states that OpenSCAD must be installed. However, it does not say when to choose this tool over alternative mesh-composition tools, nor does it give any when-not-to-use guidance.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Deploy Server

Other Tools