Skip to main content
Glama
mayjack0312
by mayjack0312

eda_sys_iframe_open_iframe

Open an inline frame window in the EDA editor to show HTML content from an extension package, returning operation success.

Instructions

sys_IFrame.openIFrame(htmlFileName: string, width?: number, height?: number, id?: string, props?: { maximizeButton?: boolean; minimizeButton?: boolean; minimizeStyle?: 'collapsed' | 'constricted'; buttonCallbackFn?: (button: 'close' | 'minimize' | 'maximize') => void | Promise; onBeforeCloseCallFn?: () => boolean | undefined | Promise<boolean | undefined>; grayscaleMask?: boolean; title?: string; x?: number; y?: number }) -> Promise 打开内联框架窗口 remarks: 本接口仅扩展包允许调用,用户需要在扩展包内包含用于内联的 HTML 文件;

本接口调用后将会打开一个 Dialog 窗口,该 Dialog 窗口的标题为 HTML 文件的 <title>,标题栏有关闭按钮;

正文部分为内联框架,width 和 height 均为正文部分内联框架的宽高;

内联框架需要展示 htmlFileName 的内容,该 HTML 从扩展包内获取,并已在安装时被存储至 IndexedDB 中

注意:本接口仅扩展有效,在独立脚本环境内调用将始终 throw Error 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.8/5.0
Behavior4/5

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

No annotations are provided, so the description carries full burden. It discloses that a Dialog opens, title comes from HTML <title>, title bar has close button, width/height refer to the iframe body, HTML is sourced from extension package and IndexedDB, and standalone calls throw. This is strong but not exhaustive; e.g., modal behavior and effect on existing iframes are not covered.

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 TypeScript signature is front-loaded, followed by a concise Chinese purpose and well-organized remarks. The content is necessary and mostly non-redundant, though the long props type makes it somewhat heavyweight.

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

Completeness3/5

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

The description explains core workflow, constraints, and error behavior well, but leaves gaps for a tool with this many parameters. It does not explain how to map signature arguments into the schema's args array, nor the semantics of several optional props, and there is no output schema to clarify return behavior beyond a boolean.

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?

The description includes the full function signature with types and optionality, which goes beyond the generic schema wrapper (args array, windowId). However, meanings of many props (maximizeButton, minimizeStyle, buttonCallbackFn, onBeforeCloseCallFn, grayscaleMask, x/y) are not explained, leaving ambiguity for an agent to set them correctly.

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 that the tool opens an inline frame window (Dialog) containing HTML content. It gives a specific action (openIFrame) and resource (htmlFileName), but does not explicitly differentiate from siblings like show_iframe, hide_iframe, or close_iframe.

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?

Provides explicit constraints: only callable from extension packages, requires the HTML file to be included in the extension, and always throws Error in standalone script environments. However, it does not compare with alternative iframe tools or state when to prefer open over show.

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