Skip to main content
Glama
mayjack0312
by mayjack0312

eda_pcb_document_get_canvas_origin

Retrieve the canvas origin offset relative to the data origin to convert between display coordinates and API data coordinates in PCB documents.

Instructions

pcb_Document.getCanvasOrigin() -> Promise<{ offsetX: number; offsetY: number }> 获取画布原点相对于数据原点的偏移坐标 remarks: 嘉立创 EDA 专业版前端显示的坐标均为画布原点;

嘉立创 EDA 专业版 API 使用的均为数据原点;

如果返回的数据为 { canvasOriginOffsetX: 100, canvasOriginOffsetY: 200 }, 则代表画布原点在数据原点的向右 100 单位且向上 200 单位的位置;

此处的单位为数据层面单位,在跨度上等同于画布层面的 mil 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

A3.7/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 full burden of behavioral disclosure. It does not explicitly state that the tool is read-only or non-destructive, but being a 'get' operation makes that obvious. It does add valuable behavioral context: it explains the unit interpretation (data-layer units equivalent to canvas-layer mil) and the directional semantics of the offset (right and up). This goes beyond the minimal information but does not cover potential edge cases like errors or the effect of windowId.

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 structured with a function signature, a concise purpose statement, and remarks that clarify coordinate systems and units. It is front-loaded with the key purpose and then provides necessary context. The 'returns' line is somewhat redundant with the initial purpose statement, and the remarks are a bit verbose, but overall it is efficient for the conceptual complexity involved.

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

Completeness4/5

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

Given the tool's simplicity (no annotations, no output schema), the description does a good job of explaining the return object's meaning and the unit semantics, which is essential for correct usage. It does not explain error conditions or the behavior when windowId is omitted, but these are minor for a getter. The coordinate-system context is well covered, making the tool's purpose and result interpretable without external knowledge.

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%, with both args and windowId described in the schema. The description does not add any additional meaning to the parameters; it only explains the return value and coordinate systems. Since the schema fully documents the parameters, the baseline of 3 applies, and the description neither enhances nor detracts.

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 a specific action ('获取画布原点相对于数据原点的偏移坐标' – get the offset coordinates of canvas origin relative to data origin) and names the resource (canvas origin offset). It distinguishes itself from sibling tools by focusing on the getter semantics, while siblings like convert_canvas_origin_to_data_origin and set_canvas_origin handle conversions or setting. The purpose is unambiguous.

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 provides conceptual context about the two coordinate systems (canvas origin for display, data origin for API) and explains how to interpret the returned offset, which implies when this tool is relevant for coordinate conversions. However, it does not explicitly state when to use this tool versus alternatives like the convert_* tools, nor does it mention any exclusions. The usage guidance is implied rather than explicit.

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