Skip to content

Bug: docs/mcp.md, the export tool description and CLI usage omit formats that document.formats reads and writes (DXF, EPS, EMF, WMF, SVGZ, templates) #257

Description

@coygeek

Summary

run_command document.formats reports 21 format ids, 19 writable and 17 readable. The MCP export tool's format enum is built from the engine's FORMATS table, and the open_file tool description and vectorcraft-cli --help's "Readable formats" line are built from OPEN_EXTS, so those generated lists are complete. Hand-written lists in three places give a shorter set: the open_file and export rows of docs/mcp.md, the export tool description in crates/mcp/src/tools.rs, and the run and convert usage text and module doc comment of apps/vectorcraft-cli/src/main.rs. Readers of those lists are not told that DXF, EPS, EMF, WMF, SVGZ and native templates (.vctemplate) can be exported, or that DXF, EPS, EMF, WMF and .vctemplate files can be opened. The release build does both.

Runtime or environment

  • Source: main at commit 116ff3eee7703321cf68d0c8b9218890434feefc (checked 2026-10-06).
  • Runtime: the published v0.3.1 release, vectorcraft-cli-0.3.1-macos-universal.zip (sha256 matches SHA256SUMS.txt), on macOS 27.0.1 arm64. vectorcraft-cli --version prints vectorcraft-cli 0.3.1.
  • main was not built. FORMATS, OPEN_EXTS, the tools.rs descriptions and the CLI usage text are the same on both, and the docs/mcp.md rows have the same text on v0.3.1 (lines 65 and 67) as on main (lines 162 and 164).

Steps to reproduce

  1. Download and unpack the release CLI listed under Runtime or environment.
  2. Run vectorcraft-cli run --cmd document.formats and list each format id with its read/write flags, for example with jq -c '.result.formats | map("\(.id):\(if .read then "r" else "" end)\(if .write then "w" else "" end)")'.
  3. Run vectorcraft-cli --help and read the run, convert and "Readable formats" lines.
  4. Save this SVG as in.svg: <svg xmlns="http://www.w3.org/2000/svg" width="612" height="792" viewBox="0 0 612 792"><path d="M10 10 L60 10 L60 40 L10 40 Z" fill="#ff0000"/></svg>. Run vectorcraft-cli convert in.svg out.dxf, and the same for out.eps, out.emf, out.wmf, out.svgz and out.vctemplate. Then open each result again with vectorcraft-cli convert out.<ext> back.svg.
  5. Start vectorcraft-cli mcp --headless, send initialize, notifications/initialized and tools/list, and read the export tool's description and its format enum.
  6. Compare steps 2–5 with the open_file and export rows of docs/mcp.md.

Expected behavior

Each hand-written list of formats names what the engine's format table supports, or says that it is partial and points to the complete list. The export row of docs/mcp.md itself says "the list comes from document.formats". The generated lists (the export format enum, the open_file tool description and the CLI's "Readable formats" line) already agree with the engine. The hand-written ones do not.

Actual behavior

Step 2 output on the release build (id: read/write):

vectorcraft:rw svg:rw svgz:rw pdf:rw ai:r ait:r png:rw jpg:rw gif:rw webp:rw tiff:rw bmp:rw template:rw png8:w txt:w dxf:rw eps:rw emf:rw wmf:rw tga:w psd:w

Step 3 output (excerpts):

  vectorcraft-cli run [--in FILE] [--cmd ID [--params JSON]]... [--export FILE]... [--scale N]
      ... export (.svg, .png, .pdf, .jpg, .webp, .vectorcraft by extension). ...
  vectorcraft-cli convert IN OUT [--scale N] [--artboard I | --range R] [--outline-text]
      Open IN (any readable format) and export OUT by extension (.svg, .pdf, .png, .jpg, .webp,
      .vectorcraft). ...
Readable formats: .vectorcraft, .drawcraft, .svg, .svgz, .pdf, .ai, .ait, .png, .jpg, .jpeg, .gif, .webp, .tif, .tiff, .bmp, .vctemplate, .dxf, .emf, .wmf, .eps

In step 4 every convert exited 0. file identified the outputs as "AutoCAD Drawing Exchange Format, version 2018", "DOS EPS Binary File", "Windows Enhanced Metafile (EMF)", "Windows metafile" and "gzip compressed data", and the .vctemplate conversion reported "format":"template". All six results opened again without error. vectorcraft-cli run --in in.svg --export run.dxf also wrote a DXF, although the run usage lists only six export extensions. In step 5 the format enum is ["vectorcraft","svg","svgz","pdf","png","jpg","gif","webp","tiff","bmp","template","png8","txt","dxf","eps","emf","wmf","tga","psd"].

The hand-written lists, compared with that output:

  • docs/mcp.md, open_file row: lists .vectorcraft/.drawcraft, .svg/.svgz, .pdf/.ai, .ait, PNG, JPEG, GIF, WebP, TIFF, BMP. It omits the readable .vctemplate, .dxf, .eps, .emf and .wmf extensions. The row does say that templates open as untitled documents and that "run_command document.formats lists the formats", but it presents the extension list as complete ("Opens any readable file … : …").
  • docs/mcp.md, export row, and the export tool description in crates/mcp/src/tools.rs: list svg, pdf, png, jpg, webp, gif, png8, tiff, bmp, tga, psd, txt, vectorcraft. They omit the writable svgz, template, dxf, eps, emf and wmf, all of which appear in the same tool's format enum.
  • vectorcraft-cli usage for run and convert (apps/vectorcraft-cli/src/main.rs lines 60–69), and the module doc comment of the same file (line 5, --export out.svg|.png|.pdf|.jpg|.webp|.vectorcraft): list .svg, .png, .pdf, .jpg, .webp, .vectorcraft, leaving out every other writable format, including gif, tiff, bmp, tga, psd, txt, dxf, eps, emf, wmf, svgz and .vctemplate.

Evidence

  • Expected source: the engine format table FORMATS and OPEN_EXTS in crates/engine/src/cmd/fileio/mod.rs (lines 439–582), as document.formats reports it at runtime in step 2; the export row's own statement that its list "comes from document.formats".
  • Failure source: the open_file and export rows of docs/mcp.md, the export description at crates/mcp/src/tools.rs line 269, and the usage text and module comment in apps/vectorcraft-cli/src/main.rs, set against the runtime output of steps 2–5.
  • Evidence provenance: observed
  • Local verification: reproduced
  • Reproduction completeness: complete

Restoration check

Failing: on the release build, convert writes DXF, EPS, EMF, WMF, SVGZ and .vctemplate, and open_file reads DXF, EPS, EMF, WMF and .vctemplate, yet the open_file row omits those readable extensions, the export row or export tool description omits those writable ids, or the vectorcraft-cli usage or module comment names only six export extensions. Passing: each of those hand-written lists matches the readable or writable entries that document.formats reports for the same build, or states that it is partial and points to the complete list. The generated lists keep matching the engine.

Additional context

These lists are grouped as one report because they are stale copies of the same engine table, with one source of truth, one reproduction and one check.

Triage assessment

  • Impact level: P3
  • Assessment status: supported
  • Impact basis: The defect is in documentation and help text only. Every listed format works, and exporting or opening an unlisted format succeeds when tried. A reader following these lists misses DXF, EPS, EMF, WMF, SVGZ and template support but loses no data and gets no wrong output.
  • Workaround status: available
  • Workaround basis: run_command document.formats, the MCP export tool's format enum and vectorcraft-cli --help's "Readable formats" line all give the complete lists on the release build, as steps 2, 3 and 5 show. docs/mcp.md also has sections on DXF export and import, EPS export, EMF and WMF, and EPS and PostScript import further down.

Activity

  1. added a commit that references this issue on Oct 7, 2026
    926cdc8
  2. bflatastic commented on Oct 7, 2026

    @bflatastic
    Member

    This might be fixed by #275. vectorcraft-cli --help now prints a "Writable formats" line generated from the format table, next to "Readable formats", and the run and convert usage point to it. The MCP export description covers every format in its enum. The open_file and export rows of docs/mcp.md name DXF, EPS, EMF, WMF, SVGZ and templates. Feel free to reopen if anything is still missing. Thanks again, @coygeek!

  3. added a commit that references this issue on Oct 7, 2026
    ba2ee7a
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions