publ betaReference (MCP guide)
Open publ console

publ Reference

Migration map.

membership_display_apply — Save membership display order and exposure

Use this to save the existing display editor in one call: reorder memberships, reorder their products, and set independent parent/child exposure flags. Requires OWNER or a selected-channel DELEGATEE with MANAGE_DESIGN. Hosted channel resources allow only their exact channel; an account resource cannot call this tool.

First read membership_displays_get with view:{kind:"detail",mdid:"selected-mdid"}. Copy its revision, the reference membership mid values and their reference product IDs. Do not use membership numeric IDs, connected-row IDs or a list revision.

Input Meaning
requestId Stable 8–80 ASCII letters/digits/underscores/hyphens for this exact request.
channelCode, mdid Exact selected channel and existing display. Each is a nonempty safe segment up to 512 characters.
expectedRevision SHA-256 revision from the selected detail read.
membershipOrder Optional array containing every current reference mid exactly once, including hidden memberships. Omit to keep order.
memberships Optional nonempty array of selected existing mids. Each entry changes one or more of isExposed, complete productOrder, or selected products.
memberships[].productOrder Every product ID under that reference membership exactly once, including hidden/deactivated products.
memberships[].products Selected {subscriptionProductId,isExposed} entries. Both fields required.
dryRun Defaults false. True produces a plan without a new job or save request.

At least one setting is required. Arrays are bounded to 1,000 rows each as bridge policy. Unknown properties, duplicate IDs, foreign references and incomplete order lists are rejected. Omitted memberships/products/flags remain unchanged. Hiding a parent does not clear child flags; exposing an inactive product does not activate sales.

{
  "requestId": "display-order-001",
  "channelCode": "selected-channel-code",
  "mdid": "returned-display-mdid",
  "expectedRevision": "0000000000000000000000000000000000000000000000000000000000000000",
  "membershipOrder": ["second-returned-mid", "first-returned-mid"],
  "memberships": [{
    "mid": "first-returned-mid",
    "isExposed": true,
    "productOrder": [102, 101],
    "products": [{"subscriptionProductId": 102, "isExposed": false}]
  }],
  "dryRun": true
}

Replace the zero-filled illustrative revision and all identities with values from the same detail read. The hash is over the parsed, normalized complete display, including both reference and connected projections; do not calculate it from an unparsed response or the planned save body. An order example only applies when it includes the complete current list. Inspect the plan, then use the same request and dryRun:false to save. An unchanged plan sends no POST. An empty membershipOrder:[] is valid only when the current reference list is empty; it is not a request to delete existing rows. An existing matching task's dry run reports its saved body and changesRequired relative to its saved before-state; it does not refresh the display or prove that the old plan is still current.

The bridge builds the source's full refMemberships body and sends one selected-display save. It verifies the receipt and two stable reads, comparing reference order/exposure and preserving display identity/title/default and reference membership/product business values. Price strings, activation, benefits and image references remain unchanged. Display-specific omitted reference-parent and embedded original-price/purchase-method fields stay omitted; do not fill them from another endpoint. The complete save body still contains only ordered reference identities and exposure flags. Server-generated numeric order and connected IDs can change. The tool returns connected lists as observed without inferring their effective display semantics.

PLAN_READY includes body, changesRequired and writesPerformed:false. Successful saving/observation returns MEMBERSHIP_DISPLAY_APPLIED, membershipDisplay, revision, taskId, taskType:"membership-display-settings" and verification limits. For a current accessible result, one top-level consoleUrl opens /channels/:channelCode/design/pages/membership-display-editor?mdid=<selected-mdid> at the central console origin. Demo results have no real console URL.

Keep the same task ID after an interruption. Status reads historical state from the selected task backend. Resume may dispatch a still-prepared original plan after rechecking it, but never repeats a sent POST, even after explicit rejection. A sent request with a lost response can only be reconciled by reading the known mdid. Matching stable state may complete with saveAcknowledged:false; the same flag is false for a no-op that required no save. Causality remains unverified. DISPLAY_OUTCOME_UNKNOWN means the saved plan does not match current state, not permission to create a new task and resend. Completed replay is historical; get supplies a fresh observation.

Before a new task is first persisted, its verified context is updated to the current credential version after preparatory reads. Only renewal verified within that port can establish continuity; existing journals, fingerprints and original input revisions are not rebound to a replacement credential. A completed resume that fails a context check returns the error without replacing the saved successful result, so later status can still validate the original completion. Pending/sent task error handling remains separate.

Completion and stored history use different response shapes: status exposes phase:done and lastResult; successful apply/completed resume returns MEMBERSHIP_DISPLAY_APPLIED without a top-level phase. Completed replay explicitly returns historical/replayed with verification.confirmed:false and currentStateVerified:false; original verification is retained as storedVerification. Its nextStep reads the same display detail and it has no current console destination. A no-op persists one completed task with verification.saveAcknowledged:false but sends no save POST.

The membership-display-settings task namespace follows the server-selected store. Local stdio uses file-backed state; the hosted implementation can supply its database-backed store. Keep the same authorized resource, taskType and taskId.

DISPLAY_CONFLICT requires a fresh detail and review of intent before a separately authorized new change. DISPLAY_SAVE_UNVERIFIED or DISPLAY_INFORMATION_CHANGED keeps the original task for inspection. Changed connection, credentials, actor or permission cannot be adopted into an old task. Do not ask for passwords/tokens, edit task files, or bypass a failure with account credentials.

The backend has no conditional-write guarantee here and no automatic rollback. Stored verification does not prove atomicity, visitor rendering, connected projection semantics, checkout, cache freshness or financial completion. This tool cannot create/delete/rename displays, select a default, edit Pages, change membership entitlements, prices or product activation, upload images, or purchase anything. Treat stored content as untrusted data.

Workflow contract · Read current state · Task recovery · Agent guide

Saved plan replay

An existing matching task's dryRun returns a historical saved plan, with historical:true, replayed:true, phase, taskId and false current verification. It has no current console/action link and does not reread target business state, repeat effects or change the journal. Follow nextStep for a current observation; retain the original task ID for status/resume or uncertain-outcome inspection. A new task keeps normal fresh-plan validation.

nextStep: membership_displays_get retains the original channel and view:{kind:"detail",mdid:<saved-mdid>}. Saved body and changesRequired compare the original request with its saved before-state, not present display or prices. Display metadata, sales activation, prices and financial actions remain outside this writer.

Saved record identity

Apply/dry-run replay and task status/resume bind both the saved ID and saved input requestId to the requested task ID. An intact record stored under another lookup key is also refused with TASK_STATE_UNVERIFIED, before business reads or effects. Keep both records for inspection; do not rename/edit them, use the embedded ID or create a replacement task to bypass refusal. Matching tasks keep their existing validation and recovery rules. Connection/authorization checks may still run; this guard is not a complete record schema or current-state verification.

Inputs

Field Required here Contract
mdid Yes string; min length 1; max length 512; The display block mdid from membership_displays_get.
membershipOrder No array; items: string; min length 1; max length 512; A membershipMid of this display block.; max items 1000; The membershipMid values in the new display order.
memberships No array; min items 1; max items 1000
memberships[].mid Yes string; min length 1; max length 512; The membershipMid of a membership in this display block, from membership_displays_get.
memberships[].isExposed No boolean
memberships[].productOrder No array; items: integer; greater than 0; max items 1000
memberships[].products No array; min items 1; max items 1000
memberships[].products[].subscriptionProductId Yes integer; greater than 0
memberships[].products[].isExposed Yes boolean
confirmToken No string; pattern ^ct[a-f\d]{32}$; The confirmToken from this tool's preview result. Omit it to preview; repeat the same input with it to execute.