Skip to main content
Glama
mayjack0312
by mayjack0312

eda_sys_dialog_insert_script_to_dialog

Inject custom script functions into EasyEDA Pro native dialogs by specifying dialog ID and function arguments, enabling automated dialog interactions.

Instructions

sys_Dialog.insertScriptToDialog(dialogId: string, scriptFunction: (...args: Array) => void | Promise, ...args: Array) -> void 向指定原生弹窗注入函数

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
argsNo按官方签名顺序排列的JSON参数数组
windowIdNo目标EDA窗口ID;省略时使用当前活动窗口

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv2.0.0

TDQS

C2.8/5.0
Behavior2/5

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

With no annotations, the description must disclose behavior. It only states the operation and return type (void). It omits side effects, execution context, error conditions, or any implications of injecting a function into a native dialog (e.g., whether the function persists, cleanup, or thread/context details).

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is very short (a signature and one-line Chinese explanation). It's front-loaded with the signature but lacks any structured breakdown. While concise, it sacrifices necessary detail for a tool with complex parameter semantics.

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?

For a tool that injects executable functions, the description is incomplete. It doesn't explain how to pass a function in the args array, the purpose of windowId, how to obtain a dialogId, or the expected behavior (e.g., when the function is invoked). No output schema exists, so the description should cover return behavior but doesn't.

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 coverage is 100% with both parameters described, but the description adds the function signature which clarifies that 'args' should be an ordered array matching dialogId, scriptFunction, and then function arguments. However, it doesn't explain how to serialize a function in JSON, making the mapping incomplete for an agent.

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 action ('inject a function into the specified native dialog') and provides the full function signature, making the purpose specific and distinguishable from sibling dialog tools (e.g., showing dialogs vs. injecting scripts). It's not overly detailed but sufficient to identify the operation.

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

Usage Guidelines2/5

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

No guidance is given on when to use this tool versus the other dialog-related siblings (e.g., show_confirmation_message, show_input_dialog). It doesn't mention prerequisites like the dialog being open or how to reference a dialog created by other tools.

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