Skip to main content
Glama
mayjack0312
by mayjack0312

eda_pcb_primitive_component_get_all

Retrieves all PCB primitive components (devices) from the active EasyEDA Pro PCB editor, optionally filtered by layer and lock status, returning an array of component objects.

Instructions

pcb_PrimitiveComponent.getAll(layer?: TPCB_LayersOfComponent, primitiveLock?: boolean) -> Promise<Array> 获取所有器件 returns: 器件图元对象数组

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
argsNo按官方签名顺序排列的JSON参数数组
windowIdNo目标EDA窗口ID;省略时使用当前活动窗口

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv2.0.0

TDQS

B3.2/5.0
Behavior2/5

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

No annotations are provided, so the description carries the full burden. It discloses that this is a read operation returning a promise of an array, but it does not describe behavior such as whether the result is scoped to the current PCB document, whether layer filtering is inclusive, what primitiveLock means semantically, or any side effects. The signature line adds the return type but little 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?

The description is compact: a signature line, a one-line Chinese summary, and a return-type note. It front-loads the API signature and keeps the summary short. Minor redundancy exists between the signature and the Chinese summary ('获取所有器件' restates getAll), but overall it is efficient.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a simple read-all tool with no output schema, the description provides the essential return type and optional filter parameters. However, it lacks context about the document scope (which PCB document is queried), the meaning of primitiveLock, and how the result relates to sibling get_all tools. Given the large sibling set, a bit more routing context would improve completeness.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100% for the two parameters (args array and windowId), but the schema descriptions are generic ('按官方签名顺序排列的JSON参数数组' and '目标EDA窗口ID'). The description's signature line names the two actual parameters (layer and primitiveLock) with types, which adds meaning beyond the generic schema. However, it does not explain the semantics of TPCB_LayersOfComponent values or the primitiveLock boolean.

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 description states a specific verb ('获取所有器件' / get all components) and resource (PCB primitive components), and the signature line clarifies it returns an array of IPCB_PrimitiveComponent objects. It is distinguishable from siblings like eda_pcb_primitive_component_get (single component) and eda_pcb_primitive_component_get_all_primitive_id (IDs only), though it doesn't explicitly name those alternatives.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies usage: call this to retrieve all PCB component primitives, optionally filtered by layer or primitiveLock. It does not explicitly state when to prefer this over sibling tools like eda_pcb_primitive_component_get_all_primitive_id or eda_pcb_primitive_object_get_all, nor does it mention exclusions or prerequisites (e.g., active document requirements).

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