Skip to main content
Glama
mayjack0312
by mayjack0312

eda_sys_shortcut_key_register

Registers custom shortcut keys in EasyEDA Pro with user-configurable defaults. Updates existing registrations and respects system shortcut priority.

Instructions

sys_ShortcutKey.register(id: string, props: ISYS_ShortcutKeyDataWithCallFn) -> boolean 注册快捷键 remarks: 此处注册快捷键时传入的 shortcutKey 仅为默认快捷键,用户可以在设置中修改

如若该快捷键与系统快捷键冲突,系统快捷键将会优先生效

如果需要修改已注册的快捷键信息,可以直接调用本接口,并在 props 中传入完整的需要修改的快捷键数据

本接口无法修改系统快捷键

注意:本接口仅扩展有效,在独立脚本环境内调用将始终 throw Error

ADD since EDA v4.2 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
Behavior4/5

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

No annotations provided, so description must carry full burden. It discloses key behaviors: default shortcut can be overridden by user, system shortcuts take precedence, can modify registered shortcuts, not for system shortcuts, only works in extension context, throws error otherwise. This is strong behavioral disclosure.

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?

Description is compact, includes signature, remarks, and returns, but is somewhat dense. It front-loads the purpose and provides important caveats, though could be better organized with headers.

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 no output schema, the description explains return value (boolean success) and critical constraints. It lacks details on the props structure, but schema covers it, and the key behavioral caveats are present.

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 has 100% coverage for args and windowId, but description doesn't detail the parameters beyond the signature. It adds that props contains shortcut key data, but the schema already describes the structure. Baseline 3 is appropriate.

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 tool registers a shortcut key, with signature details and remarks explaining behavior. It distinguishes from sibling tools like get/unregister by naming the operation, though not explicitly compared to siblings.

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 context on when to use it (for registering or modifying shortcut keys) but does not explicitly mention when not to use it or alternatives. It implies usage for extensions only, which is a key constraint.

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