Skip to main content
Glama
mayjack0312
by mayjack0312

eda_sys_math_intersection

Compute the intersection of two polygons in EasyEDA Pro. Returns the resulting polygon group, or an empty array when no overlap exists.

Instructions

sys_Math.intersection(polygon1: TSYS_MathPolygonInput, polygon2: TSYS_MathPolygonInput) -> TSYS_MathPolygonGroup 计算两个多边形的交集 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.4/5.0
Behavior3/5

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

No annotations are provided, so the description carries the burden. It discloses the return type (TSYS_MathPolygonGroup) and the empty-array behavior for no intersection, which is useful. However, it does not disclose potential side effects (likely none, as a pure math function), error conditions, or coordinate system assumptions. The description adds some behavioral context beyond the signature but not comprehensive.

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 signature line, a one-line Chinese explanation, and a return note. It is front-loaded with the operation and return type. The only minor issue is that the return note is redundant with the signature's return type, but it adds the empty-array semantics, so it earns its place.

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

Completeness3/5

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

For a pure math function with no output schema and no annotations, the description gives the essential operation and return behavior. However, it lacks details about the expected format of TSYS_MathPolygonInput (e.g., how polygons are represented: vertex arrays, holes, etc.), which an agent would need to construct valid arguments. It also doesn't mention whether the result is a group of polygons (e.g., disjoint intersection pieces), which is implied by the return type but not explained. Given the complexity of polygon geometry, this is a moderate gap.

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?

Schema description coverage is 100% for the two top-level parameters (args and windowId), but the actual function parameters (polygon1, polygon2) are only named in the description's signature line. The description does not explain the structure of TSYS_MathPolygonInput or how to format the args array. It adds the parameter names and types, which is helpful, but the schema's 'args' description is generic ('JSON参数数组按官方签名顺序排列'), so the description partially compensates but leaves the polygon input structure undocumented.

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 verb ('计算' = calculate) and resource ('两个多边形的交集' = intersection of two polygons), and includes the function signature with parameter types and return type. It clearly distinguishes from siblings like eda_sys_math_union, eda_sys_math_subtract, and eda_sys_math_intersects by naming the exact operation. However, it doesn't explicitly contrast with sibling tools, so it doesn't fully earn 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 Guidelines3/5

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

The description implies usage: it takes two polygons and returns their intersection. It does not explicitly state when to use this tool versus alternatives like eda_sys_math_intersects (which likely tests boolean intersection) or eda_sys_math_union. There is no explicit when/when-not guidance, but the operation is clear enough that an agent can infer when it applies.

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