Skip to main content
Glama

pcb_modify_polygon

Modify a PCB polygon pour's net, layer, hatch style, or copper-removal options; changes are recorded for the next repour, so run a repour afterward to update the board.

Instructions

Modify a polygon pour's properties and its pour options.

Changes net, layer, hatching style, or the three "remove" options from the Polygon Pour dialog. Use pcb_get_polygons first to find the polygon index.

NOTHING HERE REPOURS. The pour options and the hatch style decide what the NEXT pour produces, so the board does not change until pcb_repour_polygons runs. The reply carries repour_needed for that reason: a change that has been recorded and not yet poured is otherwise indistinguishable from one that did nothing.

Args: index: Polygon index (from pcb_get_polygons output) net: New net name to assign (optional, empty = no change). A name that matches no net on the board is reported under not_applied rather than ignored. layer: New layer name (optional, empty = no change) hatch_style: New hatch style (optional). Exactly four are accepted, and anything else is reported rather than silently dropped: "Solid" - solid copper fill "NoHatch" - outline only, no fill "45Degree" - 45-degree crosshatch "90Degree" - 90-degree crosshatch remove_dead: Remove dead copper, the islands with no connection to the polygon's net. None leaves it unchanged. remove_narrow_necks: Remove necks narrower than the polygon's threshold. None leaves it unchanged. remove_islands_by_area: Remove islands below the polygon's area threshold. None leaves it unchanged.

Returns: {"modified": bool, "success": bool, "index": N, "name": ..., "changed": [field names], "not_applied": [{item, reason}], "repour_needed": bool, "note": ...}.

``modified`` reports whether anything actually changed, not
whether the call ran. ``changed`` names each field that took.

Input Schema

NameRequiredDescriptionDefault
netNo
indexYes
layerNo
hatch_styleNo
remove_deadNo
remove_narrow_necksNo
remove_islands_by_areaNo

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.6.1

TDQS

A5/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 well: it discloses that the tool records changes without repouring, explains repour_needed, distinguishes modified from ran, and describes not_applied for rejected values. This is exactly the behavioral context an agent needs.

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?

The description is long but earns its length. Purpose is front-loaded, critical non-repour behavior is emphasized early, and the Args/Returns structure makes the 0%-documented schema usable without wasted sentences.

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?

Complete for a 7-parameter mutation tool with no annotations and 0% schema coverage. It documents all parameters, the side-effect boundary around repouring, and the return fields, so an agent can call it correctly without external context.

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 it documents every parameter: index source, optional empty-string no-change semantics for net/layer, how unmatched net names are reported, the four accepted hatch styles, and None semantics for the three remove options.

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: 'Modify a polygon pour's properties and its pour options.' It explicitly distinguishes this from repouring by naming pcb_repour_polygons and directs the agent to pcb_get_polygons for the index.

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 says to use pcb_get_polygons first to find the polygon index, and states that nothing is repoured here so pcb_repour_polygons must run for the board to change. This gives clear when-to-use and alternative-tool 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