Skip to main content
Glama

boolean_op

Perform cut, fuse, or intersection Boolean operations on two existing objects by handle, returning volume metrics and warnings for degenerate cuts.

Instructions

Boolean operation on two existing objects, referenced by their handles.

op: 'cut' (base minus tool), 'fuse' (union), or 'common' (intersection). base, tool: handles returned from add_primitive (e.g. 'box_1', 'cylinder_1'). strict: raise instead of warning on a degenerate cut (see below).

Returns {handle, volume, removed_volume, volume_ratio}, plus warnings — a list of strings — ONLY when the cut looks degenerate; the key is absent on a clean op, so "warnings" in result is the test. removed_volume: base_volume - result_volume, mm3. Positive means material went away (always so for cut/common); NEGATIVE on a fuse, where it is the volume the tool added. volume_ratio: result_volume / base_volume, or None when the base was empty. The two warned cases are cut-only, and each means the cut did not do what was asked: annihilation (result ~ 0 — the tool swallowed the base, so every later feature operates on nothing) and miss (result == base — the tool never intersected the base, so nothing was removed). Warn-don't-fail is the default because cutting everything away is legitimate in some workflows; pass strict=True in a scripted recipe to turn both into an error instead.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
opYes
baseYes
toolYes
strictNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.7/5.0
Behavior5/5

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

With no annotations, the description carries the full burden and does so: it discloses the default warn-don't-fail policy and the rationale (cutting everything away is legitimate), the two failure modes (annihilation, miss), and the key-absence contract so the caller knows 'warnings' in result is the test. This is exactly the behavioral context an agent needs.

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?

Front-loaded with the core purpose and op semantics, then progressively details return values and warnings. Every unit of information is useful, though the return-value block is dense and slightly verbose in places rather than perfectly tight.

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

Completeness5/5

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

No output schema exists, yet the description fully specifies the return object (handle, volume, removed_volume, volume_ratio) including the sign convention on fuse and the None case for an empty base. For a 4-param, annotation-free CSG tool, nothing an agent needs to call it correctly is missing.

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

Parameters5/5

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

Schema coverage is 0%, so the description must compensate and it does: it defines each op value, explains that base/tool are handles from add_primitive with example format ('box_1', 'cylinder_1'), and describes strict's effect (raise vs warn on degenerate cut). All four parameters gain meaning beyond the bare schema.

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

Purpose5/5

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

States a specific verb (boolean operation) and resource (two existing objects referenced by handles), and enumerates the three operation semantics ('cut' base minus tool, 'fuse' union, 'common' intersection). This clearly distinguishes it from nearby modelers like pad, pocket, and revolve that build rather than combine bodies.

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

Usage Guidelines4/5

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

Gives strong conditional guidance: when the two warned degenerate cases occur and when to opt into strict=True ('pass strict=True in a scripted recipe'). It also tells the caller where base/tool handles come from (add_primitive). It stops short of explicitly framing when to choose boolean_op over sibling CSG/modeling tools.

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