Skip to main content
Glama

measure_geometry

Measure widths, lengths, distances, gaps, or overlap between layout shapes returned by query_region. Returns results in microns and database units.

Instructions

Measure a value from shapes previously returned by query_region.

Modes and the number of target_ids they take: path_width (1), segment_length (1), bend_radius_estimate (1), centerline_distance (2, bounding-box centers), edge_gap (2, bounding-box gap), overlap (2, bounding-box overlap area). Results are in microns and database units.

Args: session_id: Session returned by open_layout. mode: Measurement mode (see above). target_ids: Shape ids from query_region.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
modeYes
session_idYes
target_idsYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.2.3

TDQS

A4.2/5.0
Behavior3/5

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

With no annotations, the description must carry the behavioral burden; it discloses output units (microns and database units) and that measurements are bounding-box based for some modes, which are real behavioral facts. It does not state whether the call is read-only, whether shapes must all come from the same query_region invocation, or how invalid target_ids are handled.

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?

Purpose is front-loaded, then modes, then args — a sensible order with no filler prose. The trailing Args block partially restates session_id/mode/target_ids already introduced above, a small redundancy that keeps it from a 5.

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?

An output schema exists, so return formatting needn't be described, and the description adds the unit convention anyway. Mode arities, prerequisite tools, and parameter provenance are all covered; only edge cases (mismatched sessions, invalid ids, mixed-source shapes) are unaddressed.

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% and even the `mode` string has no enum, so the description is the only documentation — and it fully compensates, enumerating all seven modes with their required target_ids arity and defining the two bounding-box semantics. Each of the three parameters is given provenance and meaning.

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 a value from shapes') and names the producing sibling (`query_region`), which cleanly separates it from listing/analysis tools like list_cells or analyze_waveguide. The mode list further pins down exactly what kind of measurement is produced.

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?

Explicitly ties usage to a prior `query_region` call and requires target_ids sourced from it, plus session_id from `open_layout`, giving a clear call chain. It does not, however, exclude or compare against alternatives such as analyze_waveguide or run_drc_script for related geometry questions.

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