Skip to main content
Glama
mayjack0312
by mayjack0312

eda_sch_primitive_polygon_create

Create a polygon primitive in an EasyEDA Pro schematic by specifying line coordinates, color, fill color, line width, and line type.

Instructions

sch_PrimitivePolygon.create(line: Array, color?: string | null, fillColor?: string | null, lineWidth?: number | null, lineType?: ESCH_PrimitiveLineType | null) -> Promise<ISCH_PrimitivePolygon | 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/5.0
Behavior2/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure, and it only states that a polygon is created and returned. It does not explicitly disclose that this is a document-mutating write operation, what happens on failure (the Promise<... | undefined> return hints at no-result but offers no reason), or whether an active schematic document/window is required.

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 and front-loaded with the most useful content, the full API signature, followed by a one-line gloss and return note. The Chinese '创建多边形' is somewhat redundant with the tool name, but it does not bloat the entry overall.

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?

Despite the signature, an agent cannot confidently construct valid args: the format of 'line: Array<number>' (flat coordinates? pairs? units?) is undefined, the ESCH_PrimitiveLineType enum values are not listed, and there is no output schema or annotation to explain the ISCH_PrimitivePolygon return or failure behavior. The signature and minimal gloss are insufficient for correct invocation.

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 100% with generic descriptions ('args' as an ordered JSON array, 'windowId' as target window), so the baseline is 3. The description adds real value beyond the schema by enumerating the exact inner signature — line, color, fillColor, lineWidth, lineType with types and optionality — which is essential since args.items is an untyped '{}'. However, it does not explain the semantics of the line coordinate array or lineType enum values.

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 action and resource — '创建多边形' plus the signature sch_PrimitivePolygon.create — so an agent can tell it creates a polygon primitive. It does not explicitly differentiate it from sibling creation tools (e.g., circle_create, rectangle_create, eda_pcb_math_polygon_create_polygon); the name's eda_sch_primitive prefix carries that distinction.

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 about when to use this tool versus alternatives — no exclusions, prerequisites, or references to sibling tools. '创建多边形' only restates the function; against a sibling list with many similar primitive-create tools, an agent gets no selection help.

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