Skip to main content
Glama
civil-qto-mcp

civil-qto-mcp

measure_linear_and_area_features

Measures linear lengths (m) and net surface areas (m2) from DXF layers, enforcing 2D projection, deduplicating overlaps, and subtracting islands for reliable quantity takeoffs.

Instructions

[STEP 3A of HITL Workflow] Deterministically measure linear lengths (m) and net surface areas (m2).

Engineering guarantees:
- Enforces 2D horizontal projection (Z=0) so 3D 'Flying Z' vertices never distort lengths
- Analytical circular arc (`bulge`) length calculation + sagitta-bounded spline/ellipse discretization
- 1D topological deduplication of exact and partially overlapping lines
- 2D Shapely boolean `.difference()` for island subtraction (guaranteed immunity against
  double-deduction even when HATCH entities already contain internal hole loops)

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": {
      "file_path": "<file_path>"
    },
    "name": "measure_linear_and_area_features"
  }
}

Input Schema

NameRequiredDescriptionDefault
file_pathYesPath to the .dxf drawing file.
linear_layersNoLayer names to measure for linear features (curbs, edges, utility lines, fences) in meters (m).
boundary_layersNoLayer names containing outer closed boundaries or HATCHes for surface/pavement area measurement in square meters (m2).
explode_insertsNoIf True, virtually explodes INSERT block references on target layers.
include_hatchesNoWhether to extract area polygons from HATCH entities on boundary/island layers.
snap_tolerance_mNoSnap tolerance in meters for colinear overlap deduplication and exploded line polygonization.
island_hole_layersNoLayer names containing internal islands/cutouts (e.g., green islands, tree pits) to subtract from `boundary_layers`.
unit_scale_to_meterNoConfirmed multiplier converting 1.0 CAD unit to meters (e.g., 1.0 for m, 0.01 for cm, 0.001 for mm).
min_island_deduction_m2NoVOB/C (DIN 18318) threshold: islands smaller than this area (m2) are NOT deducted from pavement area (0.0 = deduct all).
auto_close_gap_tolerance_mNoMaximum start-to-end gap (in meters) to automatically close 'almost closed' polylines on area layers.
deduplicate_linear_overlapsNoIf True (default), uses 1D Shapely topological union to deduct exact and partial overlapping segments.

Output Schema

NameRequiredDescriptionDefault
warningsNo
file_pathYes
area_summaryNo
linear_summaryNo
elevation_anomaliesNo
unit_scale_to_meterYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.7/5.0
Behavior4/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 well: it discloses Z=0 projection, analytical bulge arc handling, 1D topological deduplication, and Shapely difference-based island subtraction with double-deduction immunity. It omits side effects (does it write files?), performance/scale limits, and any permission assumptions, which keeps it short of a 5.

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 one-line purpose followed by a tight bulleted list of guarantees; each bullet conveys a distinct engineering property. Some bullets are dense with jargon and could be trimmed, but nothing is redundant filler.

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?

For an 11-parameter, no-annotation tool with an output schema, the description covers the algorithmic behavior an agent needs to trust the numbers. The remaining gaps are workflow routing (when this vs. sibling quantity tools) and operational traits like output location or runtime, which are not fully addressed.

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

Parameters3/5

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

Schema description coverage is 100%, so the schema already documents all 11 parameters thoroughly. The description adds only indirect semantics — 'bulge' arcs and deduplication behavior map to snap_tolerance_m and deduplicate_linear_overlaps — without adding syntax or defaults beyond the schema, so baseline 3 applies.

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

Purpose4/5

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

States a specific verb and two resources with units: measure linear lengths (m) and net surface areas (m2), and labels itself STEP 3A of a HITL workflow. It is clearly distinct from quantity/volume siblings, though it never names a sibling tool to differentiate from.

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 '[STEP 3A of HITL Workflow]' tag implies this is a mid-pipeline measurement step and the schema hints at usage via layer-role parameters, but there is no explicit when-to-use/when-not guidance and no named alternative for related tasks such as pavement layer quantities.

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