Skip to main content
Glama

pcb_tune_length

Adds approximate routed length to a PCB net by placing a square serpentine meander at a chosen point, then reports the routed length before and after.

Instructions

Add approximate routed length to a net with a square serpentine.

Lays a square meander on net at (x_mils, y_mils) sized to add about add_length_mils, then reports the net's routed length before and after.

Open-loop and NOT DRC-checked: you choose where the meander goes and verify clearance afterward (pcb_run_drc). Use it to get a net close to a target, then finish in Altium's interactive tuner if needed. There is no scriptable interactive tuner in Altium, so this is the available approximation.

Args: net: net name. add_length_mils: target length to add (mils). x_mils, y_mils: anchor point of the meander (mils). layer: routing layer (default TopLayer). amplitude_mils: meander height; bump count = add_length / (2*amplitude). width_mils: track width.

Returns: {"length_before_mils", "length_after_mils", "added_mils", "bumps", "drc_checked": false}.

Input Schema

NameRequiredDescriptionDefault
netYes
layerNoTopLayer
x_milsYes
y_milsYes
width_milsNo
amplitude_milsNo
add_length_milsYes

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.6.1

TDQS

A4.8/5.0
Behavior4/5

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

With no annotations present, the description carries the full burden and does well: it discloses that the operation is open-loop, not DRC-checked, approximate in the length it adds, and that the caller owns meander placement and clearance. It does not state reversibility/undo behavior or what happens if the anchor point overlaps existing routing, 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.

Conciseness5/5

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

Front-loaded with the action, then the caveats, then structured Args/Returns blocks. Every sentence adds information an agent needs — the tuner caveat, the DRC warning, and the bump formula all earn their place.

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 7-parameter geometry mutation with no annotations, the description covers purpose, caveats, all parameter meanings, and the return payload (including `drc_checked: false`), which additionally reinforces the DRC caveat. Nothing needed to call it correctly is missing.

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

Parameters5/5

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

Schema coverage is 0%, so this had to compensate, and it does: every one of the 7 parameters is explained, including defaults (layer=TopLayer, width), the geometry meaning of x_mils/y_mils as the meander anchor, and the non-obvious relationship bump count = add_length / (2*amplitude) that governs amplitude_mils.

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+resource ('Add approximate routed length to a net with a square serpentine') and immediately clarifies the mechanism and the report it produces (length before/after). It is clearly distinguishable from siblings such as pcb_calc_length_match or pcb_get_trace_lengths, which only measure.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Explicitly frames the workflow: use to get a net close to a target, then finish in Altium's interactive tuner, and notes there is no scriptable interactive tuner so this is the available approximation. It also names the follow-up alternative tool (`pcb_run_drc`) for clearance verification.

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