Skip to main content
Glama
mayjack0312
by mayjack0312

eda_pcb_primitive_image_create

Creates a PCB image primitive from polygon data at a given position and layer, with optional size, rotation, mirror, and lock settings. Returns the image object for use in the layout.

Instructions

pcb_PrimitiveImage.create(x: number, y: number, complexPolygon: TPCB_PolygonSourceArray | Array | IPCB_Polygon | IPCB_ComplexPolygon, layer: TPCB_LayersOfImage, width?: number, height?: number, rotation?: number, horizonMirror?: boolean, primitiveLock?: boolean) -> Promise<IPCB_PrimitiveImage | undefined> 创建图像 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.1/5.0
Behavior2/5

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

The description offers almost no behavioral disclosure beyond the function signature itself. It does not mention that the operation modifies the PCB document, whether it requires an active document or window, error handling, or side effects. No annotations are present, so the description carries the full burden, and it only shows the signature and return type ('Promise<IPCB_PrimitiveImage | undefined>'), which is part of the signature, not an explanation.

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 concise, consisting of the function signature and two short Chinese lines ('创建图像' and 'returns: 图像图元对象'). It is front-loaded with the signature, which is information-dense. No unnecessary words or redundancy, making it efficient.

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

Completeness2/5

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

Given the tool's complexity—many parameters, nested polygon types, layer specifications, and a return object—the description is inadequate. It does not explain what an image primitive is, what the polygon sources should be, how the layer parameter works, or what the returned object contains. There is no output schema, so the description should clarify the return value more. The tool also likely requires an active PCB document, but that is not stated. Overall, an agent would struggle to invoke this correctly without external knowledge.

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?

The description lists all parameters with their types and optionality markers (e.g., 'x: number', 'complexPolygon: TPCB_PolygonSourceArray | ...', 'layer: TPCB_LayersOfImage'), providing essential structure. However, it does not explain the meaning of each parameter, such as what a valid complexPolygon looks like or what layer values are accepted. The input schema only has 'args' and 'windowId', so the signature is the sole source of parameter semantics, but it lacks descriptive detail.

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?

The description includes the full function signature 'pcb_PrimitiveImage.create(...)' which clearly specifies the verb (create), the resource (a PCB primitive image), and the parameters (x, y, polygon, layer, etc.). This distinguishes it from sibling tools like eda_pcb_primitive_image_delete, get, and modify, and the Chinese '创建图像' confirms the action.

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

Usage Guidelines2/5

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

No guidance is provided on when to use this tool versus other image-related tools (e.g., eda_pcb_image_tool_start_place_vector_image) or other primitive creation tools. The description merely gives the signature and a one-line Chinese summary, with no mention of prerequisites, context, or alternatives.

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