Skip to main content
Glama
pzfreo

build123d-mcp

resolve

Idempotent

Evaluate a selector expression on a named CAD object to obtain a geometry descriptor: true center, area/length, normal, or axis.

Instructions

Evaluate a selector expression against a named object and return a geometry descriptor. selector is a Python expression suffix applied to the object, e.g. '.faces().filter_by(Axis.Z).last()'. If label is given, the descriptor is stored in session.geometry_refs[label] and appears in session_state(). Returns JSON: {label, ref, object, selector, type, geom_type, area/length, center}. center is the entity's true centre — the arc centre for a circular/elliptical edge, the area centroid otherwise — not the parametric midpoint, which for a circle or cylinder lies ON the entity a radius from its axis. A planar face also carries normal; a curved face carries axis {origin, direction} and radius instead, because a curved face has no single normal (a sphere carries neither — its centre and radius say everything). A list-valued selector carries count, an aggregate center averaged over every match, and per-entity descriptors in entities (first 50, with entities_truncated when there are more). The ref field uses @cad[object#label] format.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
labelNo
selectorYes
object_nameYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.3.27

TDQS

A4.4/5.0
Behavior5/5

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

Beyond the annotations, the description discloses the side effect of storing descriptors in session.geometry_refs when a label is provided. It also exposes important geometric edge cases, such as the true centre versus parametric midpoint and the behavior of curved faces, which an agent could not infer from annotations alone.

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 description is dense but every sentence adds useful behavioral or output information, especially around center computation and curved-face handling. Its length is justified by the tool's complexity, though a more structured layout (e.g., bullets for output fields) would improve skimmability.

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?

The description explains what the tool does, how to use the selector, what the label parameter does, the full return structure, and the subtle geometry semantics. It is thorough enough for an agent to call the tool correctly even without parameter descriptions in the schema.

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?

With 0% schema description coverage, the description compensates by explaining selector syntax with a concrete example and detailing label's storage side effect. Object_name is less explicit, but the phrase 'named object' and the @cad[object#label] format give enough context for an agent to understand its role.

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 names a specific verb, 'Evaluate a selector expression against a named object', and a concrete resource type, making the tool's function unmistakable. The emphasis on selector expressions and geometry descriptors clearly sets it apart from sibling geometry tools like measure or inspect_part.

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 a clear context of use through its example and selector explanation, so an agent can infer when this tool is appropriate. However, it never explicitly states when to use this tool instead of sibling tools like script, execute, or measure, nor does it mention exclusions.

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