Skip to main content
Glama
mayjack0312
by mayjack0312

eda_sys_file_manager_set_document_source

Modify the document source in EasyEDA Pro. Returns true if successful, false when the source format is invalid.

Instructions

sys_FileManager.setDocumentSource(source: string) -> Promise 修改文档源码 returns: 是否修改成功,如果输入的文档源码格式错误,将返回 false 的结果

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.9/5.0
Behavior2/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It only says it modifies document source and returns a boolean, false on format error. It does not disclose potential side effects (e.g., overwriting the current source, unsaved changes being lost), permission requirements, or whether the document must be open in a specific window. This is insufficient for a mutation tool.

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 compact: a signature line, a one-line purpose, and a return-value note. It is front-loaded with the signature and avoids extraneous text. The Chinese phrasing is terse but clear, and every sentence conveys something. It loses one point because the return-value sentence is somewhat redundant with the signature's `Promise<boolean>`.

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 mutation tool with no annotations and no output schema, the description should explain what 'document source' means, how to construct the `args` array, and any side effects or prerequisites. It only covers the return value partially (false on format error). The lack of usage guidance and parameter detail makes it incomplete for an agent to call correctly without external knowledge.

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% (both `args` and `windowId` have descriptions), so the baseline is 3. The description adds the signature `setDocumentSource(source: string)` which clarifies the first `args` element is a string, and the return value semantics. However, it does not explain how the `args` array maps to the signature or what format the source string must be (e.g., raw JSON vs. encoded). It provides marginal value but doesn't fully compensate for the opaque generic items type.

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 '修改文档源码' (modify document source) with the function signature `setDocumentSource(source: string)`, giving a verb and resource. It distinguishes from sibling `get_document_source` by the set/rest verb pair, though it doesn't explicitly name alternatives. The scope (which document) is implied by the `windowId` parameter but not explicitly stated.

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?

There is no guidance on when to use this tool versus related tools like `eda_lib_symbol_update_document_source` or `eda_lib_footprint_update_document_source`. No prerequisites, target document selection, or exclusions are mentioned. The description only states the action and return value, leaving the agent to infer usage context.

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