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

P&ID: Draw Line

pid_line_draw

Connect two P&ID ports with a single LWPOLYLINE on the correct class layer, auto-routing orthogonal paths or accepting waypoints to draw process and signal lines.

Instructions

Connect two ports with one LWPOLYLINE on the class's layer.

Ports come from pid_symbol_insert; a bubble's radial port is entered without a name. auto picks the shortest orthogonal route that leaves each port straight for stub mm; when none exists the call refuses and says so — pass waypoints. crossings counts existing P&ID lines the new one cuts (reported, never refused) and port_reuse names ports that already had a line (branching is legal). Signal classes get ISA-5.1 markers (//, X, L, o) as small blocks on segments >= 15 mm; electric is dashed by layer. A signal line carries no pipe line number: it gets no auto-built number and no label, and does not consume the process sequence — a verbatim line_number is still written and labelled. With waypoints, a bubble's exit leaves towards the first waypoint (and the entry arrives from the last one); crossings follows existing arcs, not their chords.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
toYes{handle, port} of a placed symbol, or {x, y}
sizeNoNominal size, e.g. 100
specNoPiping spec, e.g. CS1
stubNoMinimum straight run leaving each port (mm)
arrowNoFlow arrow at the end; default per class (process yes, signal no)
from_Yes{handle, port} of a placed symbol, or {x, y}
labelNoWrite the line number along the longest segment
routeNoauto (orthogonal) | direct | [[x, y], ...] waypointsauto
serviceNoService code, e.g. P
insulationNoInsulation code, e.g. IH
line_classNoprocess_major | process_minor | utility | pneumatic | electric | hydraulic | capillary | dataprocess_major
line_numberNoVerbatim line number; omit to build one from the fields
number_formatNoDefault {size}-{service}-{seq}-{spec}-{insulation}; empty fields drop out

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 only readOnlyHint=false from annotations, the description carries the full burden and does so richly: auto-route refusal and waypoint recovery, crossing counts never refusing, port reuse being legal, ISA-5.1 markers for signal classes, dashed electric by layer, and the distinction that signal lines get no auto number or label but accept verbatim line_number. It also clarifies how bubble exits and entries behave with waypoints. This is deep behavioral disclosure beyond structured fields.

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 front-loaded with the core operation, then layers in behavioral detail. It is dense and paragraph-heavy, but nearly every sentence adds useful routing or classification nuance rather than restating the schema.

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?

For a 13-parameter P&ID drawing tool with an output schema and minimal annotations, the description covers routing, failure modes, signal-specific rendering and numbering, waypoint semantics, and port behavior. An agent has enough context to invoke it correctly without needing external documentation.

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 description coverage is 100%, so the baseline is 3. The description adds material meaning beyond the schema by explaining how route='auto' picks the shortest orthogonal path with stub departure, how waypoints alter bubble exit/entry direction, and how signal line classes affect labelling and numbering.

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 first sentence states a specific verb and resource: 'Connect two ports with one LWPOLYLINE on the class's layer.' It distinguishes this from generic line creation and explicitly ties inputs to pid_symbol_insert, so an agent can tell it apart from siblings like entity_create_line or pid_symbol_insert.

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 description gives clear context for when to use the tool (connecting placed symbol ports, handling auto-route failures, signal-class behavior) and explains the waypoint fallback. It does not, however, name explicit alternatives such as entity_create_polyline or pid_line_list for cases where a non-P&ID line is wanted.

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