Skip to main content
Glama
mayjack0312
by mayjack0312

eda_pcb_math_polygon_create_polygon

Create a single polygon in EasyEDA Pro from a source array, returning the polygon object or undefined for invalid data.

Instructions

pcb_MathPolygon.createPolygon(polygon: TPCB_PolygonSourceArray) -> IPCB_Polygon | undefined 创建单多边形 returns: 单多边形对象,undefined 表示数据不合法

Input Schema

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

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv2.0.0

TDQS

C2.7/5.0
Behavior2/5

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

With no annotations, the description must carry behavioral disclosure. It does mention that 'undefined' indicates invalid data, which is useful. However, it does not disclose whether the function modifies the document, requires an open PCB window, or any side effects. The safety profile is unclear.

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, with the signature and return behavior in two short sentences. It front-loads the purpose. No wasted words, though it could be slightly more informative without becoming verbose.

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 is a creation function with two parameters, but the description omits crucial details: the expected format of the polygon source array, any side effects on the current document, and the structure of the returned IPCB_Polygon object. Without output schema, the return type alone is insufficient. The description is minimal and leaves the agent to guess.

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

Parameters2/5

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

The input schema's descriptions are generic ('按官方签名顺序排列的JSON参数数组'), and the description only provides the type name 'TPCB_PolygonSourceArray' without explaining its structure or required fields. The agent cannot infer what data to pass. Schema coverage is 100% but adds no semantic value.

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 clearly states it creates a single polygon, with the function signature and return type. The verb 'create' and resource 'single polygon' are specific. It does not explicitly name sibling tools like create_complex_polygon, but the term 'single' distinguishes it from that.

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 on when to use this tool versus alternatives like eda_pcb_math_polygon_create_complex_polygon. No prerequisites or context are mentioned. The description only states what it does, not when to choose it.

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