Skip to main content
Glama
mayjack0312
by mayjack0312

eda_pcb_math_polygon_calculate_width

Calculate the bounding-box width of a complex polygon in PCB designs to enable precise dimension checks and layout verification.

Instructions

pcb_MathPolygon.calculateWidth(complexPolygon: TPCB_PolygonSourceArray | Array | IPCB_Polygon | IPCB_ComplexPolygon) -> number 计算复杂多边形 BBox 宽度 returns: BBox 宽度

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.9/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 of behavioral disclosure, but it only restates the computation and return type. It does not mention units, coordinate system, error handling on invalid polygons, document/context requirements, or confirm the read-only nature beyond the verb 'calculate'. For a simple pure function this is minimal but not misleading.

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 front-loaded signature followed by two short clarifying lines. There is no wasted text, though the Chinese and English lines are redundant with each other and with the tool name.

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 unusual polygon type unions, no output schema, and no annotations, this description is insufficient for an agent to construct a reliable call. It omits what TPCB_PolygonSourceArray or IPCB_Polygon look like, what units the returned width is in, and whether a specific document context is required. The type signature hints at the shape but does not make the invocation practical.

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 schema covers only the generic wrapper parameters (args and windowId), so the description's signature is the only place the actual parameter 'complexPolygon' and its type union are documented. That adds meaning beyond the schema. However, the exotic types (TPCB_PolygonSourceArray, IPCB_Polygon, etc.) are never explained, and there are no formatting examples, so the compensation is only partial.

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 the operation: computing the bounding-box width of a complex polygon ('计算复杂多边形 BBox 宽度'). The verb and resource are specific and the 'BBox' qualifier disambiguates it from other polygon width concepts. It does not explicitly distinguish from sibling tools like calculate_bbox_height or calculate_height, which prevents a 5.

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 choose this tool over alternatives, what context it requires, or what preconditions must hold. The description is purely a signature restatement and offers no situational direction, so an agent has to infer usage from the name alone.

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