Skip to main content
Glama

Bounding Box

bounding_box
Read-only

Measure a solid's axis-aligned bounding box in millimeters and obtain min, max, size, center, and diagonal. Use the optional tight mesh box to verify dimensions and avoid over-estimation.

Instructions

Axis-aligned bounding box (AABB) of a shaped object. All lengths in mm, in world coordinates. This is a measurement — it returns numbers, not a new object, and does not modify the model.

KNOWN QUIRK (issue #284): min/max/size are FreeCAD/OCC's ANALYTIC box, which is an UPPER bound, not the true extent. OCC boxes a trimmed face using its untrimmed carrier surface, so a planar cut through fillets, chamfers, lofts or a sphere can report several mm of material that is not there — a real case had a trim plane at X=-32.0 reported as X=-36.7. Before you conclude a part is the wrong size, check "verified" (and pass tight=True): the analytic box over-estimating a correct part looks exactly like a wrong part.

handle: the object to measure. oriented: if True, also compute the tightest box at any orientation (the oriented bounding box, OBB) and return it under "oriented"; if the build can't compute it, "oriented" is null. Default False. This is about ORIENTATION, not tightness — it comes from the same analytic geometry and inherits the same over-estimate. tight: if True, also tessellate the shape and return the mesh-derived box under "tight" — the trustworthy numbers when the analytic box over-estimates. Opt-in because tessellation is not free (~1.4s on a 200mm plate with 60 filleted holes). Default False. deflection: mesh chord tolerance in mm for tight=True. Default diagonal/2000 (floor 0.001mm); larger is coarser and faster.

Returns a dict: min [x,y,z] mm — lower corner of the analytic AABB (upper bound) max [x,y,z] mm — upper corner of the analytic AABB (upper bound) size [x,y,z] mm — extents (max - min) along X, Y, Z center [x,y,z] mm — AABB center point diagonal float mm — space-diagonal length of the AABB oriented null, or {size:[x,y,z] mm, center:[x,y,z] mm, diagonal: mm} when oriented=True and supported — the minimum-volume box at the shape's best orientation (size is its three edge lengths). verified how far min/max above can be trusted: "exact" — proven tight (the shape's own vertices reach all six faces of the analytic box). "mesh_agrees" — tight=True found no disagreement beyond the mesh tolerance. "unverified" — unproven, the usual verdict on a curved part. Treat min/max/size as an upper bound only, and re-run with tight=True to measure. "over_estimate" — tight=True proved the analytic box overshoots. Use "tight"; min/max/size are wrong-big. tight null unless tight=True, else {min, max, size, center, diagonal, deflection, triangles} measured off the mesh. Accurate to about deflection; the true box lies between "tight" and the analytic box, never outside them. warnings list of strings (empty when there is nothing to say): which face over-estimates and by how many mm, or that an unverified box has not been checked.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
tightNo
handleYes
orientedNo
deflectionNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.8/5.0
Behavior5/5

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

Beyond the readOnlyHint annotation, the description substantially discloses behavior: it states the model is not modified, reveals the analytic-box over-estimation quirk with a real example, explains when results are trustworthy, and documents performance costs of tessellation. This is rich, non-obvious behavioral context.

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

Conciseness5/5

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

The description is long but every section earns its place: a one-line purpose, a high-value quirk warning, parameter definitions, and a detailed return contract. The critical caveat about analytic over-estimation is prominently signaled, and the layout is scannable.

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?

With no output schema, the description provides a complete return-value breakdown including min, max, size, center, diagonal, oriented, verified, tight, and warnings. It also covers performance, defaults, and failure modes, making it sufficient for correct invocation and interpretation.

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 description coverage is 0%, but the description fully compensates by explaining each parameter, including default behavior, the difference between oriented and tight, and the effect of deflection on mesh fidelity. It adds meaning far beyond the raw schema types.

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?

The description clearly states 'Axis-aligned bounding box (AABB) of a shaped object' and emphasizes it is a measurement that returns numbers without modifying the model. This verb+resource+scope combination distinguishes it from nearby measurement and transformation tools.

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?

The description conveys when to use the tool, namely when an AABB measurement is needed, and includes practical guidance such as checking 'verified' and using tight=True before judging a part incorrectly sized. It does not explicitly name sibling alternatives or exclusions, so it stops short of a 5.

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