Skip to main content
Glama
mayjack0312
by mayjack0312

eda_sys_math_distance_to_point

Calculate the shortest distance from a point to a polygon boundary, returning 0 when the point lies inside the polygon.

Instructions

sys_Math.distanceToPoint(polygon: TSYS_MathPolygonInput, point: ISYS_MathPoint) -> number 计算点到多边形边界的最短距离 returns: 最短距离,如点在多边形内部则返回 0

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.3/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. It states the input types and the return behavior for interior points, but it does not explain the coordinate system (e.g., mm or mil), whether the polygon must be closed, or how boundary points are treated (e.g., if the point lies exactly on the boundary, is the distance 0 or a small epsilon?). It also does not mention any potential errors or edge cases beyond the interior point case.

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 line for the function signature, one line for the Chinese label, and two lines for the return value. It is front-loaded with the essential information (what it does and the return). It could be slightly more structured, but it is efficient and free of fluff.

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 no output schema and minimal schema detail on the input objects, the description lacks enough context for an agent to correctly construct the arguments. It does not specify the units, the coordinate system, or the required properties of the polygon and point objects. The return type is mentioned ('number'), but the formatting (e.g., precision) is not clarified. Overall, it is insufficient for a complex geometric operation.

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%, but the schema only describes the wrapper parameters (args array and windowId) without detailing the internal structure of the polygon and point objects. The description adds the formal types (TSYS_MathPolygonInput, ISYS_MathPoint) but does not explain their fields or expected formats. Given the high coverage baseline, a score of 3 is appropriate – it adds minimal value beyond the schema.

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 clearly states the operation: computing the shortest distance from a point to a polygon boundary, with the specific function name and signature. The return value and the special case of a point inside the polygon returning 0 are explicitly described, leaving no ambiguity about the tool's purpose.

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 for geometric distance calculations but does not explicitly state when to prefer this over sibling tools like eda_sys_math_contains_point or eda_sys_math_intersects. There is no discussion of alternatives or exclusions, leaving the context of use implicit.

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