Skip to main content
Glama

pcb_set_via_soldermask_relief

Sets solder mask relief around via barrels by applying a from-hole-edge expansion to every via or a specified net, then verifies the stored value on both sides.

Instructions

Open the solder mask round each via's barrel, measured from the hole edge, on both sides.

Every via, or those on net, gets its mask expansion set as a manual value with "from hole edge" on, so the opening is the hole plus expansion_mils all round. Both sides are written: a via stores a bottom value even while its sides are linked, and that value takes effect if they are ever unlinked. Each via is read back, and vias_verified counts those holding the value.

WRITTEN THROUGH THE VIA'S PAD CACHE. Assigning the expansion straight onto a via crashes Altium's scripting engine (an access violation in ScriptingSystem.DLL, measured on AD 26.10); the same value written into the cache a via shares with pads takes and reads back, so the handler only ever uses that route.

A Solder Mask Expansion rule scoped IsVia is the alternative that also covers vias placed later: pcb_create_design_rule(rule_type="solder_mask_expansion", scope="IsVia", value=<mils>).

Args: expansion_mils: Mask expansion from the hole edge, in mils. Default 4. net: Only vias on this net. Empty means every via.

Returns: vias_matched, vias_verified, expansion_mils, net, from_hole_edge.

Input Schema

NameRequiredDescriptionDefault
netNo
expansion_milsNo

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.6.1

TDQS

A4.9/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 that this is a mutation, that both sides are written, that a bottom value is stored even while sides are linked and can take effect later on unlink, that each via is read back for verification, and the pad-cache write requirement (direct assignment crashes AD 26.10). That is unusually rich behavioral context.

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?

Front-loaded with the core action, then a structured Args/Returns section. The crash narrative is a justification rather than waste, but the capitalised header and the ScriptingSystem.DLL detail run longer than strictly necessary for an agent already told which write route to use.

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 two-parameter mutation tool with no annotations, the description covers safety implications, mechanism, verification, return fields (vias_matched, vias_verified, expansion_mils, net, from_hole_edge) and the alternative approach. Nothing needed to invoke 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 the description must compensate and does: ``expansion_mils`` is defined as mask expansion measured from the hole edge with default 4, and ``net`` as a filter where empty means every via. The semantics of 'from hole edge' (opening = hole + expansion all round) are also stated.

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: opening the solder mask round each via's barrel from the hole edge on both sides. It is unmistakably distinct from siblings like pcb_create_design_rule or pcb_normalize_vias, and even calls out the design-rule sibling as the alternative route.

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 scopes the operation ('Every via, or those on ``net``') and names the alternative approach with its comparative advantage: a Solder Mask Expansion rule scoped ``IsVia`` also covers vias placed later, with the exact call signature given. That is real when-to-use guidance, not an implied hint.

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