Skip to main content
Glama

Scene Measure

scene_measure
Read-onlyIdempotent

Measure the spatial relationship between two Maya objects to get clearance, distance, or overlap values before moving or separating them; read-only and requires an active Maya session.

Instructions

Measure the spatial relationship between two objects.

Call this in the compute step (the second of ICEV's four steps), to turn a spatial question into a number before you execute a change: size a clearance before moving something, prove two objects interpenetrate before you separate them, or get the axis detail behind an overlap that scene_validate reported.

Read-only and idempotent: it queries world-space bounding boxes and never modifies the scene, so no checkpoint file is written. Requires an active Maya session.

Every mode measures world-space AABBs, not the mesh surface and not the object origin. Each shape's own box is transformed once, so a rotated parent no longer widens the result layer by layer; geometry that does not fill its own box (an L-shape, a character mesh) can still measure up to one axis-alignment too wide. The modes differ in what the number means: center distance between the AABB midpoints. surface distance between the closest facing AABB corners — an axis-aligned approximation, so it over-reports clearance for rotated or concave geometry. clearance SIGNED, and 0 is NOT a "merely touching" signal. Per axis the gap is +separated / 0=touching / -penetrating: > 0 euclidean distance across the STRICTLY SEPARATED axes only. Penetrating axes contribute 0, so they are invisible in this number. = 0 no axis is strictly separated and at least one axis is exactly touching. The other axes may be deeply penetrating, so 0 does NOT mean the boxes just touch. < 0 all three axes penetrate; the value is the SHALLOWEST penetration depth, the minimum translation needed to pull them apart. bbox_overlap is true if and only if all three axes strictly penetrate. A single penetrating axis already makes it read false, so it can never be read as "no penetration". Read details.clearances_xyz for the signed per-axis truth before concluding anything from distance alone. bbox overlap test. On overlap, distance is 0 and overlap_dims holds the per-axis penetration extents; otherwise distance is euclidean and gaps_xyz holds the per-axis gaps.

Distances are in the scene's current linear unit (cm, m or mm), not always centimetres.

Boundary: Disambiguated from scene_inspect (per-object property deep-dive), scene_snapshot (whole-scene spatial overview) and scene_assert (checks the scene against expected values rather than measuring one pair).

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": {
      "obj_a": "<obj_a>",
      "obj_b": "<obj_b>"
    },
    "name": "scene_measure"
  }
}

Input Schema

NameRequiredDescriptionDefault
modeNoWhat the returned number means — see the list above.center
obj_aYesFirst object name.
obj_bYesSecond object name.
formatNoOutput format - "cos" or "json".cos
session_keyNoMaya session key.

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv0.6.0
    • changedInput schema / properties / mode / description
      Previous value: -"Measurement type:\n- \"center\": Center-to-center distance (default)\n- \"surface\": Closest surface point distance\n- \"clearance\": Gap/clearance distance\n- \"bbox\": Bounding box overlap detection"New value: +"What the returned number means — see the list above."
  2. First observedv0.4.1

TDQS

A4.8/5.0
Behavior5/5

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

Annotations already cover read-only/idempotent/non-destructive, but the description adds substantial context beyond them: no checkpoint file is written, an active Maya session is required, results are world-space AABBs rather than mesh surfaces or origins, and the unit is the scene's current linear unit. It also discloses the accuracy limits (rotated parents, concave geometry over-reporting) so the agent knows when to distrust a number.

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?

Well front-loaded: purpose, then timing, then behavior, then mode-by-mode semantics, then boundary. The clearance block is long but each qualifier prevents a real misreading (0 not meaning touching, penetrating axes invisible in distance). Slightly over-extended for a five-parameter tool, but nearly every sentence earns its place.

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?

Covers timing, prerequisites, accuracy caveats, units, per-mode semantics and sibling boundaries, and an output schema already exists so return formatting needn't be spelled out. The only minor gap is that it does not say how to obtain or reuse session_key or what happens if the session is stale.

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 100%, but the schema's mode description is circular ('see the list above'), so the description must carry the semantics — and it does, defining center, surface, clearance and bbox individually, including the non-obvious signed clearance behavior and the bbox_overlap predicate. It also points to details.clearances_xyz and overlap_dims so the agent knows which returned field carries the authoritative per-axis truth.

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 and resource ('Measure the spatial relationship between two objects') and then explicitly disambiguates itself from scene_inspect, scene_snapshot and scene_assert by naming what each of those does instead. An agent can pick the right tool from the definition alone.

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

Usage Guidelines5/5

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

Gives concrete when-to-use triggers tied to the workflow (compute step, before executing a change: size a clearance before moving, prove interpenetration before separating, follow up on a scene_validate overlap). It also names the sibling alternatives and the condition that routes away from this tool, which is exactly what usage guidance should do.

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