Skip to main content
Glama
mayjack0312
by mayjack0312

eda_pcb_document_set_canvas_origin

Set the canvas origin offset relative to the data origin to align displayed coordinates with API data coordinates, ensuring consistent positioning during PCB design operations.

Instructions

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

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

如果希望在 API 操作时前端画布坐标能与数据一致, 建议调用本方法并设置偏移量为零, 即 setCanvasOrigin(0, 0);

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

A4.1/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. It discloses the effect (sets offset), the return type (boolean), and the unit (data-level units equivalent to mil). However, it doesn't mention side effects such as whether existing canvas coordinates are immediately affected, or whether a document must be open. For a simple setter this is acceptable but not exhaustive.

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 front-loaded with the signature, then provides concise remarks. Each sentence adds value: coordinate system explanation, use-case recommendation, and unit clarification. No redundancy or fluff, though it could be more structured with separate sections for signature and remarks.

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?

For a simple setter tool, the description covers the key aspects: what it does, when to use it, units, and return type. It doesn't mention prerequisites like active document or error handling, but these are common to the tool family and not critical for correct invocation. The description is sufficient for an agent to understand and call the tool appropriately.

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

Parameters4/5

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

The input schema only describes generic wrapper parameters (args array, windowId). The description provides the actual signature with offsetX and offsetY, explaining they are offsets relative to data origin and giving unit context. This adds meaning far beyond the schema's 'JSON参数数组' placeholder, though it doesn't describe range or typical values beyond the zero recommendation.

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 states a specific verb ('set') and resource ('canvas origin offset relative to data origin') with a clear method signature. It distinguishes the tool from siblings like get_canvas_origin by explaining the canvas vs. data coordinate systems, which clarifies exactly what this tool modifies.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

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

It provides clear context about when to use it: when API operations need to match front-end canvas coordinates, recommend setting offset to zero. It explains the two coordinate systems, which helps an agent decide when this tool is appropriate. However, it doesn't explicitly mention alternatives like get_canvas_origin or conversion tools for reading/transforming coordinates, so it stops short of full 'when-not' guidance.

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