Skip to main content
Glama
sheares

easyeda-mcp-fix

by sheares

document_get_source

Read-onlyIdempotent

Retrieve the raw source code of the active EasyEDA document (schematic, PCB, or panel) in internal format for inspection, editing, and write-back.

Instructions

Get the raw source code of the currently active document (schematic page, PCB, or panel). Returns the document as a string in EasyEDA's internal format (on EasyEDA Pro 3, one {header}||{body} line per record). Use editor_open_document to switch to the desired document first, then call this tool. The source can be modified and written back with document_set_source.

For schematic and PCB documents, the source is also run through the schema validator as a side effect — any unknown tags get logged to ~/.easyeda-schema-discovery.jsonl so we can grow the schema. The response itself is unchanged. Use document_validate for a structured validation report.

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. Formats differ: on EasyEDA Pro 3, document_save_to_file returns {header}||{body} lines, while the .epro from project_export_file holds newline-delimited JSON arrays, which is what the src/lib editing library reads. 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

NameRequiredDescriptionDefault
documentYesTarget document UUID — auto-switches to this document before executing. Get UUIDs from list_instances or editor_get_open_tabs.
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/5.0
Behavior4/5

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

Annotations already cover the safety profile (readOnlyHint, idempotentHint, non-destructive), so the bar is lower, yet the description still discloses a non-obvious side effect: the source is run through the schema validator and unknown tags are appended to ~/.easyeda-schema-discovery.jsonl while the response stays unchanged. It also specifies the return format (EasyEDA internal format, {header}||{body} per record on Pro 3).

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 purpose, format, and side effect are correctly front-loaded, but roughly half the text is a FAST-BATCH workflow discussion about document_save_to_file / project_export_file / document_load_from_file that never mentions this tool and belongs with those sibling definitions. That dilution costs structure despite the well-organized opening.

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

Completeness4/5

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

With no output schema, the description correctly carries the burden of describing the return value (a string in EasyEDA's internal format, with record layout noted) and its side effect. Prerequisites and related tools are covered; only minor format detail is left implicit.

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 both parameters (document UUID, instance_id) are fully documented in the schema. The description adds no parameter-level detail beyond what the schema already provides, so the baseline of 3 applies.

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?

First sentence states a specific verb and resource ('Get the raw source code of the currently active document') and enumerates the document kinds (schematic page, PCB, panel). It also names the counterpart tool (document_set_source) and the validation alternative (document_validate), so an agent can place it precisely among siblings.

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?

Gives an explicit prerequisite ('Use editor_open_document to switch to the desired document first, then call this tool') and routes validation to a different tool ('Use document_validate for a structured validation report'). It does not state when NOT to read the source, but the context is clear.

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