Skip to main content
Glama
mayjack0312
by mayjack0312

eda_sys_iframe_is_iframe_already_exist

Check if an iframe already exists in the EasyEDA Pro window by providing its ID. Returns true if present, false otherwise.

Instructions

sys_IFrame.isIFrameAlreadyExist(id: string) -> Promise 内联框架是否已存在 remarks: 注意:本接口仅扩展有效,在独立脚本环境内调用将始终 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

B3.1/5.0
Behavior3/5

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

With no annotations provided, the description carries the full burden. It does disclose meaningful behavior: it throws Error when called outside an extension environment ('本接口仅扩展有效,在独立脚本环境内调用将始终 throw Error') and states the return type (Promise<boolean>, 'returns: 是否存在'). It also notes the 'since EDA v4.2' availability. However, it doesn't clarify edge-case semantics such as whether a nonexistent/invalid id returns false versus throwing.

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 short with no redundant sentences, but the mixed-language layout (English signature, Chinese purpose, Chinese remark) creates a fragmented structure. The crucial 'throws Error in standalone scripts' warning is reasonably placed after the purpose. Slight redundancy exists between the signature's `Promise<boolean>`, the 'returns' line, and the purpose line, which all convey existence semantics.

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?

For a simple boolean-check tool with 2 parameters and no output schema, the description is mostly adequate: it covers the return type, the single id parameter via signature, and the standalone-environment failure mode. Remaining gaps are minor for this complexity level—the args-to-id mapping is only implicit, and windowId is documented solely in the schema rather than the description, but nothing critical prevents a competent agent from calling it.

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%, so the baseline is 3. The schema already explains windowId ('目标EDA窗口ID;省略时使用当前活动窗口'). The description adds some value by embedding the signature showing that args holds a single positional `id: string`, which clarifies what goes inside the opaque `args` array. Yet neither source explains how args relates to windowId invocation or the id format, so the description only marginally supplements the schema.

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 purpose is clear: the signature `sys_IFrame.isIFrameAlreadyExist(id: string) -> Promise<boolean>` combined with the Chinese line '内联框架是否已存在' (whether the inline iframe already exists) states a specific resource and check action. It's inherently distinguishable from its iframe siblings (open/show/hide/close), though the description never explicitly names them, so differentiation relies on the reader inferring that a check tool differs from action tools.

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?

The description offers no guidance on when to use this tool versus the sibling iframe tools (open_iframe, show_iframe, hide_iframe, close_iframe). There's no hint that it should be called before opening an iframe to avoid duplicates, and no exclusions. The only contextual note is the '扩展有效/throws Error' remark, which is an environment constraint rather than usage routing 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