md2wechat Agent API markAgent API Docs
md2wechat Agent API markAgent API Docs
Homepage

Start

Markdown to WeChat API DocsQuickstartAuth

APIs

Integrations

Operations

ErrorsPricingContact
X (Twitter)

Doctor and Inspect Readiness

Use doctor and inspect readiness output to decide whether preview, convert, upload, or draft creation is ready before running a publish workflow.

Doctor and Inspect Readiness

md2wechat 2.4.0 gives agents a clearer way to decide what is ready before they convert, upload, or create a WeChat draft.

The short rule is:

use doctor --json to check local setup, then use inspect --json to check one article.

What each command answers

CommandUse it forDo not treat it as
md2wechat doctor --jsonlocal configuration readinessproof that one article can be published
md2wechat inspect article.md --jsonarticle-level target readinessa full account login or live upload test

doctor is local-only. It checks whether the current machine looks configured enough to attempt conversion, image generation, or WeChat draft work.

inspect checks a specific Markdown file and reports whether the requested targets are ready, blocked, degraded, or not requested.

Recommended order

For a new runtime or upgraded install, start here:

md2wechat version --json
md2wechat doctor --json
md2wechat capabilities --json

For an article workflow, continue with:

md2wechat inspect article.md --json
md2wechat preview article.md
md2wechat convert article.md

For draft creation, inspect the draft target before creating the draft:

md2wechat inspect article.md --draft --cover cover.jpg --json
md2wechat convert article.md --draft --cover cover.jpg

The readiness contract

New agents should prefer these fields from inspect --json:

{
  "data": {
    "readiness": {
      "schema_version": "1",
      "targets": {
        "preview": "ready",
        "convert": "ready",
        "upload": "not_requested",
        "draft": "blocked"
      },
      "blockers": [
        {
          "code": "MISSING_COVER",
          "target": "draft"
        }
      ]
    }
  }
}

The older fields are still available:

  • convert_ready
  • upload_ready
  • draft_ready
  • preview_fidelity

But targets and blockers are the better surface for agents because they explain what is blocked and where.

Common blockers

BlockerUsually meansNext check
MISSING_API_KEYAPI mode cannot run yetcheck md2wechat doctor --json and config
LOCAL_IMAGE_MISSINGthe Markdown points to a missing local imagefix the image path or remove it
MISSING_COVERdraft creation needs a coverpass --cover or --cover-media-id

Safe agent behavior

When building an agent workflow, do this:

  1. Run doctor --json before API-dependent work.
  2. Run the smallest discovery commands needed for the task.
  3. Run inspect --json for the article.
  4. If a target is blocked, stop that target and report the blocker.
  5. Preview before conversion or draft creation when the user has not seen the output.

This keeps automation from guessing and makes failures easier to explain.

Continue with

  • Discovery-First Workflow
  • Mode Selection
  • Article Draft

Table of Contents

Doctor and Inspect Readiness
What each command answers
Recommended order
The readiness contract
Common blockers
Safe agent behavior
Continue with