Skip to content

MCP 2: dry-run import (extract, return, create nothing) #131

Description

@deanleigh

Second increment of #129. The highest-value single call, per the field notes on #106.

The tool

updoc-import { workflowAlias, sourceFile, dryRun: true }
  → { extracted{}, warnings[] }

Returns what the workflow extracted from the source. Creates nothing, writes nothing.

Why this before creating anything

Extraction is the one step in the whole import that genuinely needs judgement. Two real examples from a single tour: the price caveat ("Price based on twin share…") extracts correctly but lands at the end of the Extras body when it belongs in the summary; and Organiser Name silently fell back to the blueprint placeholder while every other organiser field extracted fine.

Today the only way to see any of that is to click through the wizard to the point of creation, then decide. This makes review a call in its own right.

It is also the safe half. No writes means no exposure to the full-replacement hazard, so the risky work can land in its own increment with attention on it.

sourceFile

Accept a file path, as create-media already does with sourceType: "filePath". That removes the media-picker sequence entirely — no folder navigation, no search, no upload, no auto-selection check. Roughly four of the thirteen manual steps.

Media-library keys should work too, for files already uploaded.

Done when

  • Returns extraction for a real tour PDF matching what the Content tab shows
  • Accepts both a file path and a media key
  • Unknown workflow alias gives a clear error, not a stack trace
  • Nothing is created, and nothing written to the media library that was not there before

Open

Whether this needs anything from #41. Extraction and transform are already server-side C#, so possibly not — the apply logic is the browser-bound part, and this increment does not apply anything. Confirm before starting rather than assuming.

warnings[] may be thin here and fill out in MCP 4. Return the field if it is cheap; do not hold this up for it.

Part of #129. Follows #130.

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions