Digital Sovereignty for everyone

Abilities

Convert from Blocks

lh-mcp-content-transformer/convert-from-blocks Read-only Idempotent

Converts Gutenberg block markup, such as the raw post_content of a post, into HTML or Markdown, and returns it without saving anything. The mirror of convert-to-blocks: use it to read an existing block-based post into an editable format, revise it, and convert it back into equivalent blocks. The result reports block_count and any conversion diagnostics. Requires edit_posts on any site you belong to.

Parameter Type Required Default Description
content string Yes Existing Gutenberg block markup (e.g. a post’s raw post_content) to convert.
target_format string Yes Format to convert the block markup into. One of: html, markdown.
options object No Optional passthrough context for the transformer (e.g. strict/allow_fallbacks).

Convert Post to Blocks

lh-mcp-content-transformer/convert-post-to-blocks Destructive Idempotent

Converts existing posts’ raw-HTML content into Gutenberg block markup and saves it, returning a result per post ID. It does this in one server-side step, using the same conversion as convert-to-blocks. Takes only post IDs, so the converted markup never passes through the caller, and works on any post type. Each ID is handled on its own: an ID the caller cannot edit is refused, a post that already contains block markup or has empty content is skipped, and the rest of the batch carries on. Any post whose status is not draft, pending or auto-draft (published, private, scheduled, or a custom status) is treated as live and refused unless confirmed is true on the same call, so review what will change first. Returns one result per ID, with block_count and fallback_count for each converted post so any generic group or html fallbacks can be reviewed afterwards; fallbacks never block the save. Requires edit_posts, plus edit_post on each post. Pass site_id to act on another site you belong to.

Parameter Type Required Default Description
ids array of integer Yes Post IDs to convert. Works on any post type.
confirmed boolean No Required to be true for this call to convert any live post among the given IDs – any status other than draft, pending or auto-draft. Ignored for those three, which never need it.
task_id integer No Optional. The lh-tasks task this call is working on. Pass with claim_token: the call is refused unless you hold that claim, and a successful call renews it.
claim_token string No Optional. The claim_token from claim-next-task for task_id. Required when task_id is given.
site_id integer No Optional. ID of another site in the network to act on; list-my-sites gives the sites you belong to. Permissions are checked on that site. Omit for this site.

Convert to Blocks

lh-mcp-content-transformer/convert-to-blocks Read-only Idempotent

Converts HTML or Markdown into native Gutenberg block markup suitable for post_content, and returns it without saving anything. Use source_format html for anything needing layout, media, buttons or styling; Markdown cannot express the shapes that produce the richer blocks, so keep it for plain prose. The result reports block_count, and lists in fallbacks every element that could not be matched to a specific block and was degraded to a generic group or html block, with its source tag, CSS selector and sanitized HTML. Call get-pattern-guide first to learn which HTML and CSS shapes produce cover, columns, media-text and buttons blocks. To convert and save an existing post, use convert-post-to-blocks rather than passing this output to another ability by hand. Requires edit_posts on any site you belong to.

Parameter Type Required Default Description
content string Yes The HTML or Markdown source content to convert.
source_format string Yes Format of the supplied content. Use “html” for anything needing layout, styling, media, buttons, or other structure markdown cannot express; use “markdown” for plain prose. One of: html, markdown.
options object No Optional passthrough context for the transformer (e.g. strict/allow_fallbacks).

Get Pattern Guide

lh-mcp-content-transformer/get-pattern-guide Read-only Idempotent

Returns convert-to-blocks reference data: which plain elements and HTML/CSS shapes produce which blocks, and how fallbacks work. It gives the plain elements that convert directly, the HTML and CSS shapes that produce the richer blocks (cover, columns, media-text and buttons) with an example of each in priority order, and how content matching neither is reported as a fallback. Call it before writing HTML meant to produce a specific block, rather than guessing at markup and checking fallback_count afterwards. Takes no input. Requires edit_posts on any site you belong to.

Parameter Type Required Default Description
_ string No Unused. Present only to satisfy the abilities adapter, which rejects a truly empty input schema.

Repair Sourced Attributes

lh-mcp-content-transformer/repair-sourced-attributes Destructive Idempotent

Removes sourced attributes from the block comment delimiters of existing posts and saves them, returning a result per post ID. Sourced attributes are ones such as the rich-text content of paragraph, heading and list-item blocks. The block editor reads these attributes from the saved HTML and never writes them into the delimiter; when they are there, WordPress raises a rest_validate_value_from_schema notice every time the block renders. Use it on block content written by older converters that carry them. Takes only post IDs and works on any post type. Only the delimiter JSON changes; the saved HTML is left exactly as it is. Each ID is handled on its own: an ID the caller cannot edit is refused, and a post with no block markup or nothing to remove is skipped. Any post whose status is not draft, pending or auto-draft (published, private, scheduled, or a custom status) is treated as live and refused unless confirmed is true on the same call. Returns one result per ID, with attributes_removed for each repaired post. Requires edit_posts, plus edit_post on each post. Pass site_id to act on another site you belong to.

Parameter Type Required Default Description
ids array of integer Yes Post IDs to repair. Works on any post type.
confirmed boolean No Required to be true for this call to repair any live post among the given IDs – any status other than draft, pending or auto-draft. Ignored for those three, which never need it.
task_id integer No Optional. The lh-tasks task this call is working on. Pass with claim_token: the call is refused unless you hold that claim, and a successful call renews it.
claim_token string No Optional. The claim_token from claim-next-task for task_id. Required when task_id is given.
site_id integer No Optional. ID of another site in the network to act on; list-my-sites gives the sites you belong to. Permissions are checked on that site. Omit for this site.

If you like this plugin please consider making a donation to further development

Install LHero.org

lhero.org

Open it straight from your home screen, full screen and quicker to load.

  1. Tap the Share button . If you cannot see it, tap ••• first.
  2. Scroll down and tap Add to Home Screen.
  3. Tap Add.
  1. Tap the browser menu â‹®.
  2. Tap Install app or Add to Home screen.
  1. In the menu bar, choose File, then Add to Dock.

Use your browser's menu to install this site or add it to your home screen.