Skip to main content
Glama
mayjack0312
by mayjack0312

eda_sys_file_manager_get_document_source

Obtain the source code of the currently open EasyEDA Pro document. Returns undefined when no document is open or data cannot be fetched.

Instructions

sys_FileManager.getDocumentSource() -> Promise<string | undefined> 获取文档源码 returns: 文档源码数据,undefined 表示当前未打开文档或数据获取失败

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.2/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 of behavioral disclosure. It does disclose the critical undefined return case (no document open or failure), which is valuable. However, it does not state whether the operation is read-only (it appears so) or any side effects, nor does it clarify the nature of the returned 'document source' beyond being a string. It adds some useful context but lacks depth for an unannotated 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 concise, consisting of a function signature line and two short sentences. It is front-loaded with the return type and quickly explains the undefined case. No unnecessary verbiage. It could be more structured (e.g., separate usage notes), but it is efficiently short.

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?

Given there is no output schema, the description adequately explains the return value and the undefined case. However, it lacks context about when to use this tool (e.g., to get the source of the active document) and does not elaborate on the meaning or format of the document source. For a simple getter with two optional parameters, it is reasonably complete but leaves room for interpretation regarding the actual content returned.

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% (both args and windowId are described). The description adds no parameter-specific information beyond what the schema already provides. Since the schema already explains that args is a positional JSON array and windowId targets a specific window, the baseline of 3 applies; the description does not enhance parameter understanding.

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 retrieves the document source ('获取文档源码') and specifies the return type. The name itself is descriptive and distinguishes it from sibling file-manager tools like set_document_source, so the purpose is clear. However, it could be more explicit about what 'document source' means (e.g., source code of schematic/PCB), but the core action is unambiguous.

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 alternatives (e.g., get_document_file, get_schematic_file). It doesn't mention that it operates on the currently open document or the role of windowId. No exclusions or conditions are provided, leaving the agent to infer usage from the name and schema alone.

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