Skip to main content
Glama
sheares

easyeda-mcp-fix

by sheares

document_load_from_file

Destructive

Load EasyEDA document source from a local file to replace the active document, with validation and an automatic backup before upload.

Instructions

Load document source from a local file and push it into the currently active document. Reads the file from disk and calls setDocumentSource to replace the document contents. The file must contain valid EasyEDA document source (same format as document_get_source / document_save_to_file). WARNING: This replaces the entire document. A backup of the prior state is taken automatically (after validation passes) and committed to a local git-tracked repo — the returned backup.sha references the pre-edit state. Validation runs only for schematic documents (documentType=1); other types skip with a status.

FAST-BATCH WORKFLOW: for making many changes at once, it is much faster to export the document or project (document_save_to_file / project_export_file), edit the raw source on disk, then re-upload (document_load_from_file / project_import_file) than to issue many small per-primitive MCP calls. The document source is newline-delimited JSON arrays; .epro files are ZIP archives of the same. Every destructive upload is auto-backed-up to a local git repo first — the response includes a backup SHA you can use to find the prior state if the edit goes wrong. Upload tools accept validate='off'|'warn'|'strict' (default 'strict') which runs the Zod schema on the new source — see document_validate for standalone validation.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
documentYesTarget document UUID — auto-switches to this document before executing. Get UUIDs from list_instances or editor_get_open_tabs.
filePathYesAbsolute path to read the document source from
validateNoSchema validation mode for schematic uploads: 'off' skips entirely, 'warn' aborts only on malformed known tags or JSON parse errors, 'strict' (default) also aborts on any unknown-tag line.
instance_idNoTarget EasyEDA instance ID (8-char hex). Required when multiple instances are connected. Omit when only one instance is connected (auto-selected). Use list_instances to see connected instances.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.6.5

TDQS

A4.8/5.0
Behavior5/5

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

Goes well past the destructiveHint=true annotation by disclosing that a backup is taken automatically after validation passes, that it is committed to a local git-tracked repo, that backup.sha references the pre-edit state, and that validation only runs for schematic documents (documentType=1) while other types skip with a status. These are non-obvious, high-value behavioral facts for a destructive mutation.

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?

Front-loads the core action and the destructive warning, and the workflow paragraph is genuinely useful. It is somewhat long and repeats the git-backup/backup-SHA point twice, which costs a little efficiency without adding information.

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

Completeness5/5

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

There is no output schema, yet the description covers the return contract (backup.sha), the validation outcome, the mutation risk, and the recommended workflow, plus how to obtain document UUIDs via list_instances/editor_get_open_tabs. Nothing needed to invoke it correctly is missing.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so the baseline is 3; the description adds value by explaining that validate runs the Zod schema on new source and clarifying the schematic-only scope of validation. It largely restates the enum semantics already in the schema, so it does not go far beyond, but the validation-scope clarification is genuine added meaning.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb and resource ('Load document source from a local file and push it into the currently active document') and even names the internal call it makes (setDocumentSource). It distinguishes itself from project_import_file (project scope) and document_set_source (in-memory source) by tying the operation to a disk file and the active document.

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

Usage Guidelines5/5

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

Explicitly prescribes when to use this over alternatives: the FAST-BATCH WORKFLOW paragraph says to export/edit/re-upload instead of issuing many small per-primitive MCP calls, names the sibling pairs (document_save_to_file/project_export_file, project_import_file), and points to document_validate for standalone validation. When-to-use, when-not, and alternatives are all present.

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