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

P&ID: From Spec

pid_from_spec

Draw a complete P&ID from a specification inside one AutoCAD transaction; invalid geometry or a mid-run cancellation rolls back the whole sheet and reports the failing item.

Instructions

Equipment, valves, instruments and connectors placed, then every line drawn port-to-port, inside one transaction: any bad item rolls the whole sheet back and the error names it (lines[2].to); so does an interruption (a client cancellation mid-run leaves no half-drawn sheet and no open transaction on either engine — the live one goes back to the UNDO Mark transaction_begin set, so it never waits at an AutoCAD prompt; should that rollback itself fail, the failure is logged, the cancellation is what the client sees, and the drawing must be checked before a retry). A non-finite coordinate, rotation, scale or stub is refused by path before anything is placed. The response carries the graph read back from the drawing and the P&ID critique issues, so the caller sees dangling ends or duplicate tags in the same round trip. dry_run returns the planned vertices and crossings without touching the drawing.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
specYes{sheet, equipment[], valves[], instruments[], lines[], connectors[]} — see the P&ID prompt
dry_runNoValidate and route in memory; draw nothing

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv1.6.0

TDQS

A4.1/5.0
Behavior5/5

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

Annotations supply only readOnlyHint=false, so the description carries the real burden and delivers: full-transaction rollback on any bad item, the error naming the offending path (`lines[2].to`), cancellation behavior leaving no half-drawn sheet and reverting to the UNDO Mark so the engine never stalls at a prompt, logging when the rollback itself fails, and up-front refusal of non-finite coordinates/rotation/scale/stub. This is unusually rich behavioral disclosure beyond what the annotation provides.

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 atomic-transaction intent is front-loaded and nearly every clause carries operational weight (error naming, cancellation, validation, dry-run). It is dense, with long nested parentheticals, but for a tool with this much non-obvious failure behavior the length is largely earned.

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 nested-spec, output-schema-backed batch tool, the description covers the transactional contract, failure modes, cancellation recovery, validation preconditions and the dry-run alternative. An agent has enough to invoke it correctly and anticipate outcomes, even though the output schema already documents returns.

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: `dry_run` returns planned vertices and crossings without drawing, and it documents that the response carries the read-back graph and critique issues. The `spec` object shape is left to the schema, which is adequate given full coverage.

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?

The description states a specific verb+resource: it places equipment, valves, instruments and connectors and then draws every line port-to-port as a single atomic operation. That clearly separates it from the one-at-a-time siblings (pid_symbol_insert, pid_line_draw) by implication, but it never names an alternative explicitly, so it stops short of the top score.

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?

It explains what `dry_run` is for (validate/route without touching the drawing), which is genuine usage guidance, but it never says when to choose this whole-sheet generator over the granular pid_* tools or how it relates to transaction_begin/commit. Usage context is implied rather than stated.

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