lib_get_pin_list
Read a library component's pins by name, returning designators, electrical types, and coordinates, with large pin arrays written to JSON for datasheet verification.
Instructions
Get all pins of a library component.
NAME THE COMPONENT. Without component_name this reads
whatever the SchLib editor currently has selected, so the answer
depends on editor state a caller cannot see, and any tool that
moves the selection between calls changes what this returns.
Passing the name also avoids disturbing the selection, which is
what made exporting one symbol affect the next call.
DATASHEET DISCIPLINE: Pin name + electrical_type from the
symbol can be wrong, especially on libraries that have been
edited by hand or imported from third-party sources. Before
relying on a pin's function for any decision, fetch the
manufacturer datasheet and verify against its pin-description
table. The response carries _datasheet_guidance +
_datasheet_parts.
BIG SYMBOLS SPILL TO A FILE ON PURPOSE. A 699-pin module returns
more than a conversation can hold, and which half survives is
then decided by whichever client happens to be reading. Above
inline_limit pins the full array is written as JSON and the
reply carries pins_path and a summary instead. That is the
better artefact anyway: the file can be diffed against the
datasheet's pin table by script, field by field, without any of
it passing through the conversation.
Args: component_name: library reference of the symbol to read. Empty falls back to the editor's current component. output_path: write the full pin array here as JSON and return the summary. Forces the file path regardless of size. inline_limit: pin count above which the array is written to a file instead of returned inline. 0 always returns inline, which is what you want only for a small symbol.
Returns:
Dictionary with "count", "component" name, and "pins" array.
Each pin has: designator, name, electrical_type, x, y,
orientation, hidden. Plus _datasheet_guidance +
_datasheet_parts.
When spilled: "pins_path" plus "summary" giving pins per
part and the electrical-type distribution, and no "pins".
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| output_path | No | ||
| inline_limit | No | ||
| component_name | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||