Skip to main content
Glama
U-C4N
by U-C4N

Understand: Scale Check

drawing_scale_check
Read-only

Check if a CAD drawing is to scale against a reference by matching equipment tags and comparing distances, flagging to-scale plans versus schematics read-only.

Instructions

Is the drawing to scale against the reference - or a schematic whose lengths are lengths of drawn line, not of pipe? Read-only on both drawings.

Equipment tags are matched between the two (a Cyrillic look-alike such as Т4100 is the Latin T4100). Only a tag found exactly once in each is used; a tag found more than once (plan copies, a legend, a second sheet) is listed in ambiguous and takes no part. When a drawing holds several bodies of content (two copies of one plan), the pair of scopes - whole drawing or one cluster on each side - that matches the most tags is used and named in scope. For every two matched tags at least min_pair_mm apart on the reference, the ratio of their distances is taken (both in millimetres by each drawing's inferred unit, see drawing_understand). The result gives the matched tags, the median ratio, the quartiles and their range, the share of pairs within +/-10 % of the median, the same per room of the reference (or per cluster for tags in no room) in groups, and a verdict: to_scale (at least 80 % within the band; factor is the median, so a uniform other scale is recognised), schematic (50 % or less), partly in between, insufficient with fewer than three matched tags or no pair above the floor. Tag labels are not equipment centres; the band and the floor absorb that offset, and the result's notes say so.

Refused before anything is read: a reference or path that does not exist, a DXF over MAX_DXF_BYTES (the refusal names the size and the variable), a file the engine cannot parse (a DWG headlessly), and a min_pair_mm that is not a positive finite number.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathNoThe drawing to check (usually the P&ID); omitted: the current document.
referenceYesThe reference drawing of the same plant (a DXF, usually the layout): distances on it are the ones the other drawing is measured against.
min_pair_mmNoTag pairs closer than this on the reference (mm) are left out: a tag label is not an equipment centre.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv1.6.0

TDQS

A4.6/5.0
Behavior5/5

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

With readOnlyHint=true already given, the description adds rich behavior: tag matching rules, Cyrillic/Latin normalization, ambiguity handling, multi-scope selection, the exact verdict thresholds (80%/50%, three-tag minimum), and the precise refusal conditions (missing file, MAX_DXF_BYTES, unparseable DWG, invalid min_pair_mm). This far exceeds the annotation baseline.

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 purpose is front-loaded in the first sentence and each subsequent block (matching, ratio/verdicts, refusals) is organized. It is dense and long with many parentheticals, so it is slightly heavier than strictly necessary, but little is pure filler.

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?

Given an output schema exists, the description still explains the returned fields (matched tags, median ratio, quartiles, groups, verdict) and covers edge cases, scope selection, and refusal behavior. An agent has everything needed to invoke it and interpret the result correctly.

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?

Schema coverage is 100%, so the baseline is 3, but the description adds meaning beyond the schema: it explains that distances are compared in millimetres via each drawing's inferred unit (cross-referencing drawing_understand) and reinforces the min_pair_mm floor rationale as absorbing label-vs-centre offset.

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 opening sentence states a specific verb (check/verify) and resource (drawing scale vs. reference) and frames the core distinction between a to-scale drawing and a schematic. It is clearly distinguishable from siblings like drawing_understand and drawing_topology_check.

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 opening question and the refusal list make the applicable context clear, and it points to drawing_understand for the inferred unit. However, it never explicitly names an alternative tool or states when-not-to-use this one (e.g. vs. validation_check or drawing_diff).

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