Skip to main content
Glama
mayjack0312
by mayjack0312

eda_pcb_primitive_line_create

Draw a straight line on a PCB layer by specifying net, layer, start/end coordinates, line width, and lock state to add precise routing geometry in EasyEDA Pro.

Instructions

pcb_PrimitiveLine.create(net: string, layer: TPCB_LayersOfLine, startX: number, startY: number, endX: number, endY: number, lineWidth?: number, primitiveLock?: boolean) -> Promise<IPCB_PrimitiveLine | 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?

With no annotations, the description carries the full burden. It only mentions the return type (Promise<IPCB_PrimitiveLine | undefined>) and implicitly that it creates a line, but does not disclose side effects (e.g., whether it modifies the current PCB, whether it is undoable, or if it requires a specific document context). No contradiction exists since annotations are absent, but behavioral disclosure is minimal.

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: a single function signature plus two short Chinese lines ('创建直线' and 'returns: 直线图元对象'). It is front-loaded with the API call and avoids extraneous text. It could be slightly more structured but is appropriately sized for the content.

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?

The tool has eight functional parameters plus windowId, and no output schema. The description provides the signature but omits essential context such as parameter semantics, coordinate units, layer definitions, and expected behavior on failure. An agent would struggle to call this correctly without additional documentation.

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 provides the parameter names and types (net, layer, startX, startY, endX, endY, lineWidth?, primitiveLock?) which the schema's 'args' array does not detail. However, it does not explain the meaning of each parameter, units, or constraints (e.g., what 'layer' refers to, coordinate units). The schema coverage is 100% for the two container properties, so the description adds some value but not deep semantic context.

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 explicitly states '创建直线' (create line) and provides the full API signature pcb_PrimitiveLine.create(...), making the verb and resource unambiguous. The name eda_pcb_primitive_line_create aligns with the purpose, and it clearly differs from sibling create tools for other primitive types (e.g., polyline, arc, via).

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 given on when to use this tool versus alternatives. The description does not explain when to choose line over polyline, nor does it mention any prerequisites (e.g., active document, layer constraints). The agent is left to infer usage solely from the name and signature.

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