Skip to main content
Glama

pcb_get_polygons

Retrieves all polygon pours on the active PCB with outline, poured copper area, and region details to support copper coverage and current-capacity audits by net.

Instructions

Get all polygon pours on the active PCB with copper area.

Each polygon row carries:

  • index, name: positional + Altium-assigned name

  • net: assigned net (often GND / a power rail)

  • layer: TopLayer, InternalPlane1, etc.

  • hatch_style: Solid / 45Degree / Horizontal ...

  • pour_over: pour-policy flag

  • area_sqmils / area_mm2: the polygon OUTLINE's area. It does not change when the pour does, and it includes copper a clearance or the board edge has cut away.

  • copper_area_mm2: the copper actually poured, summed over the polygon's regions with the holes cleared around other nets taken off. Use this for current-capacity audits (multiply by copper thickness for cubic copper, then apply IPC-2152 / IPC-2221). A hatched pour is tracks, so it reports copper_pieces with a region area of 0.

  • copper_area_exact: false when a region's holes could not be read, in which case copper_area_mm2 is the regions' outer area and overstates the copper.

  • copper_pieces: how many pieces the pour is in; 0 on a poured polygon means nothing was poured.

  • poured: false for a shelved polygon.

  • bbox_mm2: bounding-rectangle area; ratio copper_area_mm2 / bbox_mm2 shows how much of the outline is real copper.

  • vertex_count: a smooth pour has 4-8 vertices; many more usually means hand-editing that may have introduced narrow necks.

Pair with pcb_calc_track_current_capacity for per-net current-carrying analysis.

Returns: Dict with {polygons: [...], count: N}.

Input Schema

NameRequiredDescriptionDefault

No arguments

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.6.1

TDQS

A4.1/5.0
Behavior4/5

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

With no annotations, the description carries the behavioral burden and does so well for the key output fields: it explains that copper_area_exact=false overstates copper, that hatched pours report copper_pieces with zero region area, and that copper_pieces=0 means nothing was poured. It does not explicitly state read-only/no-side-effect behavior, but the 'Get' framing and detailed caveats make the tool's data behavior largely transparent.

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 description is front-loaded with a clear one-sentence purpose and then organizes field semantics in a useful bullet list. It is long and overlaps somewhat with the available output schema, but the explanations of copper area, exactness, and poured state earn their place for interpreting the result.

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?

Given a zero-parameter read tool, an output schema, and no annotations, the description is complete enough to call and interpret correctly: it names the active-PCB scope, covers key return fields and caveats, and points to a relevant downstream analysis tool.

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?

The tool has zero parameters and 100% schema coverage, so there is no parameter meaning for the description to add. The baseline for a parameterless tool is 4, and nothing in the description lowers that.

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 first sentence gives a specific verb and resource: get all polygon pours on the active PCB with copper area. That is clear enough to distinguish it from generic object queries, but it never names or contrasts with close siblings such as pcb_calc_polygon_area, pcb_repour_polygons, or pcb_get_board_statistics.

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?

The description explicitly says to use copper_area_mm2 for current-capacity audits and to pair the tool with pcb_calc_track_current_capacity for per-net analysis. That gives clear usage context, but it does not state when to choose this tool over alternatives or when not to use it.

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