Skip to main content
Glama
guimarais
by guimarais

build_layout

Builds a flat closed XTrackCAD loop from ordered catalogue part numbers, validates gaps, angles, crossings and overlaps, centres it on a board, and exports a unique .xtc layout file.

Instructions

Build a flat closed loop from an ordered list of catalogue part numbers.

Python attaches endpoint 0 to the previous endpoint 1. All curves turn left. Example oval: six 24130, one 24188, six 24130, one 24188. Centres the result on the board with a fixed 50 mm centreline edge margin. Rejects gaps >0.1 mm, angle errors >0.1 degrees, crossings and overlaps. On failure returns measured errors and writes nothing. On success creates a unique .xtc in this project's layouts/ and returns its path and parts list. Does not open XTrackCAD or check rolling-stock clearance.

Input Schema

NameRequiredDescriptionDefault
partsYes
width_mmNo
height_mmNo

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.4/5.0
Behavior5/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: it discloses the connection rule ('endpoint 0 to the previous endpoint 1', 'All curves turn left'), the validation thresholds (0.1 mm, 0.1 degrees, crossings, overlaps), the failure contract ('returns measured errors and writes nothing'), and the success side effect (creates a unique .xtc under layouts/). This is exactly the mutation/side-effect context an agent needs before calling.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Front-loaded with the core action, then geometry rule, example, constraints, and outcome contract in that order. Every sentence adds information an agent would otherwise have to guess; the example is compact and directly illustrative rather than padding.

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?

Output schema exists, so return-value detail is optional, yet the description still summarizes path and parts list. Validation rules and the write-nothing-on-failure guarantee are fully covered. The remaining gap is the unexplained board-size parameters, which matter because they interact with the centring margin and overlap checks.

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 0%, so the description must compensate. It adds real meaning for 'parts' (ordered, catalogue part numbers, ordering drives endpoint chaining), but width_mm and height_mm are never named or explained beyond an oblique 'centres the result on the board with a fixed 50 mm centreline edge margin' — their units, defaults (2000x1200) and effect on validation are left to the schema.

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 ('Build a flat closed loop from an ordered list of catalogue part numbers') and immediately distinguishes itself from the sibling list_parts, which only enumerates parts. An agent knows exactly what artifact is produced (.xtc layout) without opening the schema.

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?

Gives a concrete worked example ('six 24130, one 24188...') plus explicit exclusions ('Does not open XTrackCAD or check rolling-stock clearance'), which tells the agent when this tool is the wrong choice. It does not name an alternative tool or state preconditions such as requiring parts to exist in the catalogue, so it stops short of full routing guidance.

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