Skip to main content
Glama

pcb_get_net_classes

Retrieve every net class and its member nets from the active PCB; optionally return class names only to avoid reading membership data.

Instructions

Get all net classes on the active PCB, with the nets in each.

Altium's script host does not expose a class's member list, so each class is asked about every net in turn. That is one call per class and net, so on a big board members=False is quicker when only the names are needed.

Args: members: Read each class's nets (default). False returns the class names only.

Returns: Dictionary with "net_classes" (each with name, super_class and, when members are read, "nets", "member_count" and "probe_errors"), "count" and "members_read". A class with probe_errors above 0 may have more nets than listed.

Input Schema

NameRequiredDescriptionDefault
membersNo

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 present, the description carries the full behavioral burden and does well: it discloses the Altium script-host limitation, the quadratic call cost, and the probe_errors caveat that a class may have more nets than listed. It does not explicitly declare the tool read-only, but the read semantics are evident from "Get" and the return shape.

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?

Purpose is front-loaded in the first sentence, followed by the cost model, the parameter, and the caveat. The Args/Returns block is somewhat docstring-boilerplate, but the probe_errors warning earns its 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 single-optional-boolean read tool with no annotations, the description covers purpose, cost, parameter meaning, and the accuracy caveat an agent needs to interpret results. Return documentation is partly redundant with the output schema but adds the probe_errors interpretation, which the schema alone would not explain.

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?

Schema coverage is 0% and the single parameter has no schema description, so the description must compensate and does: "members: Read each class's nets (default). False returns the class names only." It also ties the flag to a performance tradeoff, adding meaning beyond the boolean type and default in the schema.

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?

States a specific verb and resource: "Get all net classes on the active PCB, with the nets in each." That is unambiguous and distinct from a plain net listing. It does not explicitly distinguish itself from nearby siblings such as pcb_get_nets or pcb_create_net_class, so it stops short of a 5.

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 conditional: on a big board use ``members=False`` when only names are needed, because the probe is one call per class-and-net pair. That is real when-to-use guidance backed by a cost model. It offers no routing advice versus sibling tools (e.g. pcb_get_nets), so it is not a 5.

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