ea-import-export
What it is for
Use it to share a package as XMI, bring XMI back in as a copy, hand someone a diagram as an image, an editable Visio file or a manifest another tool can redraw it from, give every diagram a description a screen reader can use, or generate a document. You end with the file, or the descriptions in the model, checked to hold what they should.
ea-import-export moves content out of an EA repository and back in, and makes diagrams readable to people and tools that cannot see them. It covers these kinds of output.
| You want | What leaves EA | Operations |
|---|---|---|
| A picture of a diagram | PNG, SVG or another image format | get_diagram_png, get_diagram_svg, export_diagram_image |
| An editable diagram for someone who has Visio but not EA | A .vsdx file |
export_diagram_to_visio |
| A diagram redrawn in another tool, or a copy kept in step with the model | A manifest: every shape tied to its element, with what is inside what and the route of every line | get_diagram_manifest, get_package_manifest |
| A diagram that a screen reader, a document generator or an AI can understand without seeing it | A plain-language description in the diagram's notes | create_diagram_description, update_diagram_description, audit_diagram_descriptions |
| A package for another repository or an XMI-reading tool | An XMI file, and back in again | export_xmi, import_xmi |
| A formatted document | An RTF file produced by EA's own report engine | generate_report |
The skill is a decision table plus the behavior of each operation, including the cases where EA reports success it has not earned and the cases where an operation refuses to write because a person's work would be lost. Every output runs through the server's operations. The one task that exists only in EA's own screens is authoring a report template, and the assistant can drive that with computer use.
Capabilities it uses
| Capability | Used for | Without it |
|---|---|---|
| MCP server | Every export and import: the diagram image, the Visio file, the manifest, the description, XMI out and in, and report generation. Listing the report templates a project defines | Not available. Each of these is a server operation |
| Computer use | Reading and dismissing the dialog EA raises when a call stalls. Opening a diagram in EA's window to compare it with an export. Authoring or editing a report template | The AI hands you these steps and asks for screenshots. If a call stalls on a dialog, you screenshot it, paste it into the conversation so the AI can analyze it, then dismiss it so processing can continue. You author the template in EA |
| Local code execution | Not needed | Not needed |
| Browser control | Not needed | Not needed |
When to use it, and when not
Use it when a package or a diagram has to leave EA (another repository, a document, a stakeholder without an EA license) or when an XMI file has to come back in.
| The task | Use instead |
|---|---|
| Say in plain words what a diagram shows, to a reader who has no EA | ea-stakeholder-reporting reads the description and checks that it is current. Writing or refreshing descriptions stays here |
| Report on the model: counts, roll-ups, "how many X are Y" | ea-stakeholder-reporting for one or two questions, ea-reporting-database for the whole model |
| Query the model in SQL, or put it in Power BI | ea-reporting-database, then ea-power-bi |
| Build the content you are about to export | ea-modeling |
| Protect a package before an import, or restore it afterwards | ea-change-management. A baseline, not an XMI file, is the supported backup |
| Copy a package inside the same repository | duplicate_package, not an XMI round trip. See Copy a package as new |
| An export fails repeatedly | ea-diagnostic |
How it works
- Pick the operation for the purpose. AI The AI uses the decision table below. It does not use the general diagram-inspection read as an export path, because the preview that call writes lands in the server's own cache folder beside the model file, not where a deliverable belongs.
- Export a diagram image. AI Power Tools The image is written to an explicit path you name. When the diagram may have changed outside this session (a direct database edit, another user), the AI asks for a refreshed render, because otherwise EA can return a stale image that still looks plausible. To compare the file with the diagram as EA draws it, the AI opens the diagram in EA's window and looks at it AI with computer use; otherwise you.
- Export a diagram to Visio. AI Power Tools The AI compares the number of shapes and connectors in the file with the diagram. It reports the page size if the file will be printed, because the page follows the diagram's own canvas and not a paper size.
- Redraw a diagram in another tool. (AI Power Tools, then AI) The AI reads the diagram as a manifest, or every diagram in a package as a package manifest, and draws the copy from it, so each shape keeps the link to its element. For one diagram the manifest includes EA's own picture, which gives the sizes EA drew. The AI tells you which nesting was read from the model and which was read from the drawing, and it names the lines that EA routes itself, which come without a route and which the other tool routes. A diagram open in EA with unsaved changes is read from what is stored, with no picture. The AI says so and asks you to save in EA and read again if you want those changes included AI with computer use; otherwise you.
- Give every diagram a description. AI Power Tools The first call is a preview that writes nothing. A write fills in only notes that are empty. Where the notes hold a person's text, the AI adds the description after it and leaves the text as it was. A package run writes each diagram on its own, so a diagram with a refusal does not stop the others.
- Audit, then refresh. (AI Power Tools, then AI) The audit gives each diagram one status and writes nothing. The AI reports counts by status and names the diagrams that need work, not the raw rows. A refresh creates, extends or regenerates each description as it needs and keeps a person's edits, as described below. A bulk refresh writes what it can and lists the diagrams that wait for a decision.
- Decide what a person's words are worth. (AI, you) When the diagram has changed and the description holds a person's words, nothing is written. The AI shows you the diagram as a picture file to open, and the current description and the new one side by side. It proposes a text that carries your edits into the new one, says which sentences it kept and which it dropped, and asks where a sentence names something no longer on the diagram. You take that text, change it or keep the current one. The AI writes the text you decided, then runs the audit to confirm the diagram reads current.
- Export a package as XMI. (AI Power Tools, then AI) AI Power Tools reads the file back before it reports success. The AI then compares the number of elements found in the export with the number in the package, rather than trusting the status alone.
- Import XMI. (AI, with you) The AI recommends a baseline of the target package first, because the import changes that package in place. You approve. AI Power Tools imports with fresh identifiers, so the import behaves as a copy, and the AI checks how many items were created. If the call stalls on a dialog, the AI reads it and dismisses it; without computer use, you screenshot the dialog, paste it into the conversation so the AI can analyze it, then dismiss it AI with computer use; otherwise you.
- Generate a report. (AI Power Tools, then AI) The AI checks which report templates the project defines before assuming one, produces an
.rtffile, then opens the output and reads its heading, because a "generated" status does not show that the named template was used. If the template you need does not exist yet, creating it in EA's template editor is a UI task AI with computer use; otherwise you. - Check what leaves the building. (AI, you) A generated report embeds each element's Created and Modified author, which are modelers' own EA or Windows user names. The AI tells you to check report content for identifying detail before it is shared outside the team.
Which operation for which purpose
| Need | Operation | Notes |
|---|---|---|
| A picture of a diagram for a document, wiki or chat | get_diagram_png or get_diagram_svg |
Returns the image inline and writes it to a path if you give one. SVG scales and suits vector documents; PNG suits chat and wikis |
| The same, when the image itself is not needed in the conversation | export_diagram_image |
Writes a file in PNG, EMF, SVG, JPEG, BMP, GIF, TIFF or TGA |
| A diagram a stakeholder can move and relabel in Visio | export_diagram_to_visio |
One rectangle per element, one straight connector per relationship. See the limits below |
| A diagram redrawn in another tool, or a copy kept in step with the model | get_diagram_manifest, get_package_manifest |
Every shape keeps the link to its element. Use it instead of the Visio file whenever a shape must stay tied to its element. See Reading a diagram or a package as a manifest |
| A description for each diagram, kept current | create_diagram_description, update_diagram_description, audit_diagram_descriptions |
Words in the diagram's notes. See Diagram descriptions |
| A package into another repository, or to a tool that reads XMI | export_xmi, import_xmi |
See the verification rules below |
| A formatted document rather than a picture | generate_report |
RTF only. See the behavior below |
The image follows the diagram's own canvas size, so a very wide diagram produces a very wide image.
XMI export and import
export_xmi accepts XMI 1.0, 1.1, 1.2, 2.1 (the default), 2.4.1 and 2.5.1. Any other value is refused with the list that is supported.
After EA writes the file AI Power Tools checks that:
- the file exists
- it starts like an XMI file, and not like some other format
- if the package directly holds elements, at least one element name appears in it
The third check fails only when none of the names is found. A partial export therefore reports success with fewer elements in the file than in the package, and that comparison is yours or the AI's to make.
import_xmi allocates fresh identifiers by default and imports the diagrams. Leave that on unless you are restoring into a repository that does not already hold those identifiers. Importing with the original identifiers preserved into a model that already contains them is a collision, and EA does not fail cleanly: the call does not return, although EA stays responsive to other calls. If a call seems stuck, a dialog is the likely cause (see Shared references): with computer use the AI reads and dismisses it, and without computer use you screenshot it, paste it into the conversation, then dismiss it. After an import AI Power Tools counts the elements and child packages directly under the target package before and after; a difference of zero or less is reported as a failed import, not success. The count is one level deep, which is enough to detect "nothing happened" and is not an inventory of everything imported.
Visio export
The Visio export builds a real .vsdx with one editable rectangle per element, labeled with name and stereotype, and one connector per relationship. In verification, shape and connector counts matched the source diagram exactly on two diagrams, one with no connectors and one with eight. It draws rectangles only (no per-type stencils), straight lines between element centers (no waypoints), no swimlanes and no BPMN shapes. The recipient restyles the diagram in Visio.
Redrawing a diagram in another tool
A manifest is one complete, read-only reading of a diagram, so that another tool can redraw it and a copy can be refreshed later instead of drawn again. get_diagram_manifest reads one diagram. get_package_manifest reads every diagram in a package. Both are allowed in read-only mode and change nothing. The operations and everything a manifest holds are in Reading a diagram or a package as a manifest.
What matters for what you promise:
- Each shape keeps its element. A copy drawn from the manifest knows which element every shape stands for, what is inside what, and how every line runs. The Visio file keeps none of that.
- Nesting has two sources. It is either the element's parent in the model, or the smallest container whose drawn rectangle holds the shape, read from the drawing. The AI says which kind it relied on.
- Drawn size is not stored size. EA grows a box to fit a name it cannot break, and only its picture shows it. With the picture, the manifest gives the box EA drew where it differs from the stored one. A shape that cannot be found in the picture is reported as such, never guessed. An actor's figure and a text item draw no rectangle of their own, so they read as not found without being an error.
- Do not promise identical lines. About one line in six is routed by EA when it draws, with no stored route. The manifest marks it and the other tool routes it.
- A package describes each element once. An element placed on several diagrams is described once and counts once. A package holds every diagram that belongs to it, including a diagram owned by one of its elements.
- A diagram open in EA with unsaved changes is not touched. EA discards unsaved changes when a diagram is reloaded or closed, so the manifest is read from what is stored, with no picture, and says why. A diagram the server opened to take the picture is not left open.
The Visio file stays available for a quick one-off file. Visio itself is a separate offering, AI Power Tools for Microsoft Visio.
Diagram descriptions
A diagram's description is plain text in the diagram's notes that says what the diagram shows. It is how a screen reader, a document generator or an AI reading the model understands a diagram without seeing the picture. Every diagram can carry one, whether or not it ever leaves EA. The operations, the statuses and the full set of results are in Diagram descriptions.
- It is generated, not written by the AI. A fixed template builds it from the diagram, so the same diagram always gets the same words. The AI tells you the text is generated when it previews or writes one.
- It says what the diagram means, never how it is drawn. The kind of diagram, its groupings, every element, every relationship as a sentence, and what the diagram's own notes say. No positions, colors, stereotype identifiers or drawing words. The first sentence is at most 150 characters, so it can serve as alt text.
- It uses your technology's words. Names and the meaning of each relationship come from the technology the diagram uses, so read the output instead of expecting the Westbrook Bank wording. If the technology cannot be read, nothing is written and the AI asks you to enable or import it in EA.
- A person's text is never altered. The generated words sit between two marker lines. Text above or below them is yours.
- Previews come first. Create and update write nothing until the AI is told to, and the preview shows the text and what would happen.
A refresh treats a person's edits like this.
| The diagram changed | A person edited the words | Result |
|---|---|---|
| No | No | Nothing to do |
| No | Yes | The person's words are kept and recorded as the description |
| Yes | No | The new text is written |
| Yes | Yes | Nothing is written. The AI asks you, as in step 7 of how it works |
Other results are refused on purpose, each with nothing written:
- The diagram is open in EA with unsaved changes. The AI asks you to save in EA and run it again. A package run carries on with the other diagrams.
- The diagram changed again, or someone edited the description in EA, while you were deciding. The AI shows what is there now and asks again.
- A marker line has lost its pair. The AI tells you to repair the stray line in EA's Notes window. It does not add a second description next to it.
- Read-only mode. Create and update are refused, previews included. The audit and the manifests still work, and the manifest previews the text for a diagram that has none.
Report generation
generate_report runs an EA report template against a package through EA's report engine.
- Write
.rtf. In testing every RTF request succeeded, and HTML requests failed on a project that defines no custom templates. In some EA builds HTML output may behave differently, but RTF is the dependable choice. - The template name is not validated. In a project with no custom templates, three different template strings, two of them nonsense, produced the identical default document. A "generated" status confirms a file was written, not that your template was used. The AI looks up the templates the project defines before assuming a name.
- Never an empty template name. An empty value reproducibly hangs the call. EA itself stays responsive, so it is a per-call hang and not a reason to restart EA.
- Templates are authored in EA's own screens. The assistant drives EA's template editor with computer use; otherwise you author the template and the AI uses it.
What you get
- Image files, a Visio file, a manifest, an XMI file or an RTF file at the paths you named.
- For descriptions: the counts by audit status, the diagrams written, the diagrams that wait for a decision, and a read-back that each diagram now reads current.
- For each, a short statement of what was checked: counts compared, heading read, freshness confirmed.
- For an import, the number of items created and a reminder of where the baseline is.
- A note about author names in any generated report.
Tools it relies on
- Image, Visio and report-related diagram operations: Exporting
- Diagram descriptions: Diagram descriptions
- Diagram and package manifests: Reading a diagram or a package as a manifest
- Package interchange and report generation: Import and export
- Listing the report templates a project defines: Direct queries
- A baseline before an import: ea-change-management
Sample prompts
-
Exports the picture to the path you named.
-
Exports to Visio, checks the counts, and states the limits.
-
Exports, then compares the element counts.
-
The AI first suggests a baseline, then imports with fresh identifiers and reports the number of items created.
-
Generates the report, looks at the template list, reads the output heading and scans for author names.
-
A multi-step plan: list the diagrams, export each as SVG, generate the report, then the privacy check.
-
Reads the diagram as a manifest, draws the copy from it, and tells you which nesting came from the model, which came from the drawing, and which lines the other tool has to route.
-
Previews first, writes the empty ones, audits, refreshes, and stops to ask you about each diagram where the diagram changed and your team's words are in the description.
The package and diagram names are illustrations. Replace them with your own.
Recommended models
| Model | Fit | Why |
|---|---|---|
| Claude Fable 5.1 | Capable | More capability than the task needs. The work is procedural and the operations are deterministic |
| Claude Opus 5.5 | Capable | Handles a multi-diagram export plan without difficulty, at a cost the task does not require |
| Claude Sonnet 5.5 | Recommended | Picks the right operation, reads the verification results and notices a partial export |
| Claude Haiku 4.5 | Capable | Adequate for a single export. On the checking steps a lighter model may read the status and stop |
Ratings are guidance based on the kind of reasoning the skill needs, not measured benchmarks.
Checking accuracy and completeness
- The XMI export is real. Correct: the number of elements found in the export equals the number in the package. Complete: nothing is missing. Red flags: a lower figure (the file must not be relied on as a backup), a file of a few hundred bytes for a package that has elements, or a "wrong format" or "empty" failure treated as a warning.
- The XMI import landed. Correct: items created is greater than zero. Ask the AI to confirm independently by listing the target package's elements and counting them. Red flag: a success reported with no count.
- The Visio counts match. Correct: the shape count equals the number of elements on the diagram and the connector count equals the number of drawn relationships. Red flag: counts the AI did not compare.
- The report used the template you named. Correct: the
.rtfheading is the heading of your template. Red flag: a "generated" status offered as proof by itself. - The image is fresh. After a direct database edit or another user's change, ask for a refreshed render and compare with an ordinary one. A difference means the cached render was stale.
- Sensitive content. Ask the AI to search the generated RTF for author names before it leaves the team.
- The manifest matches the diagram. Correct: the AI says which nesting it read from the model and which from the drawing, names the lines EA routes itself, and reports a shape it could not find in the picture as not found. Red flags: lines promised as identical, a drawn size given for a diagram that was open with unsaved changes, or an element counted once per diagram in a package read.
- The descriptions are written and current. Correct: after a write the audit reads each diagram as current, and the text names the elements on the diagram. Red flags: a write reported with no audit, a package run where a refusal is not listed against its diagram, or a description quoted as current while the audit says out of date.
- A person's words survived. Correct: text above and below the marker lines is exactly as it was, and a diagram that needs a decision is listed with nothing written to it. Red flag: a refresh that overwrites a person's edited description without asking.
Limitations
- XMI is not a backup. The supported way to protect a package is a baseline. The import changes the target package in place and cannot be undone.
- Partial XMI exports are not caught by AI Power Tools. Only a total miss is an error.
import_xmiaccepts an import-type setting and ignores it. The value is echoed back and is not passed to EA.- An import with identifiers preserved can hang when the model already contains them. Leave fresh identifiers on.
- Report quirks. An empty template name hangs the server's call, and an invalid name silently uses EA's default document.
- Visio export is geometry only. For a copy that keeps each shape tied to its element, read the manifest.
- A manifest does not give a route for every line. Lines EA routes itself come back marked and without points. It does not trace them, and it does not decode hyperlink or legend objects.
- A manifest read with the picture needs EA's window. A diagram open in EA with unsaved changes is read from what is stored, with no picture and no drawn sizes. A package read without the picture drives nothing in EA.
- A description says what a diagram means, and the audit compares names. It finds a description that leaves something out. It does not judge whether a person's own text explains the diagram well.
- A description needs a readable technology. Where the diagram's technology is not loaded, nothing is written, because the alternative is a description in base EA terms.
- Descriptions are not written in read-only mode, previews included.
- Report content carries modelers' user names.
- Writes made through EA's automation interface cannot be undone, so a baseline comes first.