@prefix sioc: <http://rdfs.org/sioc/ns#> .
@prefix dc: <http://purl.org/dc/elements/1.1/> .
@prefix dcterms: <http://purl.org/dc/terms/> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix content: <http://purl.org/rss/1.0/modules/content/> .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .

<https://lhero.org/portfolio/lh-mcp-block-transformer/>
  a sioc:Post ;
  dc:title "Abilities" ;
  dcterms:identifier 147453 ;
  dc:modified "2026-10-01T16:07:37Z"^^xsd:dateTime ;
  dc:created "2026-09-14T13:37:57Z"^^xsd:dateTime ;
  sioc:link <https://lhero.org/portfolio/lh-mcp-content-transformer/abilities/> ;
  sioc:has_creator <https://lhero.org/author/1/#account> ;
  sioc:has_container <https://lhero.org/#posts> ;
  content:encoded "<ul class=\"lh_portfolio-meta\"><li><strong>Part of:</strong> <a href=\"https://lhero.org/portfolio/lh-mcp-content-transformer/\">LH MCP Content Transformer</a></li></ul><div class=\"lh_portfolio-ability-reference\"><ul class=\"lh_portfolio-ability-reference-index\"><li><a href=\"#ability-convert-from-blocks\"><code>convert-from-blocks</code></a> Convert from Blocks</li><li><a href=\"#ability-convert-post-to-blocks\"><code>convert-post-to-blocks</code></a> Convert Post to Blocks</li><li><a href=\"#ability-convert-to-blocks\"><code>convert-to-blocks</code></a> Convert to Blocks</li><li><a href=\"#ability-get-pattern-guide\"><code>get-pattern-guide</code></a> Get Pattern Guide</li><li><a href=\"#ability-repair-sourced-attributes\"><code>repair-sourced-attributes</code></a> Repair Sourced Attributes</li></ul><section class=\"lh_portfolio-ability-reference-ability\" id=\"ability-convert-from-blocks\"><h2>Convert from Blocks</h2><p class=\"lh_portfolio-ability-reference-meta\"><code>lh-mcp-content-transformer/convert-from-blocks</code> <span class=\"lh_portfolio-ability-reference-annotation lh_portfolio-ability-reference-annotation-readonly\">Read-only</span> <span class=\"lh_portfolio-ability-reference-annotation lh_portfolio-ability-reference-annotation-idempotent\">Idempotent</span></p><p>Converts Gutenberg block markup, such as the raw <code>post_content</code> 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 <code>block_count</code> and any conversion diagnostics. Requires <code>edit_posts</code>.</p><figure class=\"wp-block-table lh_portfolio-ability-reference-params\"><table><thead><tr><th>Parameter</th><th>Type</th><th>Required</th><th>Default</th><th>Description</th></tr></thead><tbody><tr><td><code>content</code></td><td>string</td><td>Yes</td><td></td><td>Existing Gutenberg block markup (e.g. a post&#039;s raw <code>post_content</code>) to convert.</td></tr><tr><td><code>target_format</code></td><td>string</td><td>Yes</td><td></td><td>Format to convert the block markup into. One of: <code>html</code>, <code>markdown</code>.</td></tr><tr><td><code>options</code></td><td>object</td><td>No</td><td></td><td>Optional passthrough context for the transformer (e.g. strict/allow_fallbacks).</td></tr></tbody></table></figure></section><section class=\"lh_portfolio-ability-reference-ability\" id=\"ability-convert-post-to-blocks\"><h2>Convert Post to Blocks</h2><p class=\"lh_portfolio-ability-reference-meta\"><code>lh-mcp-content-transformer/convert-post-to-blocks</code> <span class=\"lh_portfolio-ability-reference-annotation lh_portfolio-ability-reference-annotation-destructive\">Destructive</span> <span class=\"lh_portfolio-ability-reference-annotation lh_portfolio-ability-reference-annotation-idempotent\">Idempotent</span></p><p>Converts the raw-HTML <code>post_content</code> of existing posts into native Gutenberg block markup and saves it, 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 <code>block_count</code> and <code>fallback_count</code> for each converted post so any generic group or html fallbacks can be reviewed afterwards; fallbacks never block the save. Requires <code>edit_posts</code>, plus <code>edit_post</code> on each post.</p><figure class=\"wp-block-table lh_portfolio-ability-reference-params\"><table><thead><tr><th>Parameter</th><th>Type</th><th>Required</th><th>Default</th><th>Description</th></tr></thead><tbody><tr><td><code>ids</code></td><td>array of integer</td><td>Yes</td><td></td><td>Post IDs to convert. Works on any post type.</td></tr><tr><td><code>confirmed</code></td><td>boolean</td><td>No</td><td></td><td>Required to be true for this call to convert any live post among the given IDs &#8211; any status other than draft, pending or auto-draft. Ignored for those three, which never need it.</td></tr></tbody></table></figure></section><section class=\"lh_portfolio-ability-reference-ability\" id=\"ability-convert-to-blocks\"><h2>Convert to Blocks</h2><p class=\"lh_portfolio-ability-reference-meta\"><code>lh-mcp-content-transformer/convert-to-blocks</code> <span class=\"lh_portfolio-ability-reference-annotation lh_portfolio-ability-reference-annotation-readonly\">Read-only</span> <span class=\"lh_portfolio-ability-reference-annotation lh_portfolio-ability-reference-annotation-idempotent\">Idempotent</span></p><p>Converts HTML or Markdown into native Gutenberg block markup suitable for <code>post_content</code>, and returns it without saving anything. Use <code>source_format</code> 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 <code>block_count</code>, 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 <code>edit_posts</code>.</p><figure class=\"wp-block-table lh_portfolio-ability-reference-params\"><table><thead><tr><th>Parameter</th><th>Type</th><th>Required</th><th>Default</th><th>Description</th></tr></thead><tbody><tr><td><code>content</code></td><td>string</td><td>Yes</td><td></td><td>The HTML or Markdown source content to convert.</td></tr><tr><td><code>source_format</code></td><td>string</td><td>Yes</td><td></td><td>Format of the supplied content. Use &quot;html&quot; for anything needing layout, styling, media, buttons, or other structure markdown cannot express; use &quot;markdown&quot; for plain prose. One of: <code>html</code>, <code>markdown</code>.</td></tr><tr><td><code>options</code></td><td>object</td><td>No</td><td></td><td>Optional passthrough context for the transformer (e.g. strict/allow_fallbacks).</td></tr></tbody></table></figure></section><section class=\"lh_portfolio-ability-reference-ability\" id=\"ability-get-pattern-guide\"><h2>Get Pattern Guide</h2><p class=\"lh_portfolio-ability-reference-meta\"><code>lh-mcp-content-transformer/get-pattern-guide</code> <span class=\"lh_portfolio-ability-reference-annotation lh_portfolio-ability-reference-annotation-readonly\">Read-only</span> <span class=\"lh_portfolio-ability-reference-annotation lh_portfolio-ability-reference-annotation-idempotent\">Idempotent</span></p><p>Returns reference data for convert-to-blocks: 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 <code>fallback_count</code> afterwards. Takes no input. Requires <code>edit_posts</code>.</p><figure class=\"wp-block-table lh_portfolio-ability-reference-params\"><table><thead><tr><th>Parameter</th><th>Type</th><th>Required</th><th>Default</th><th>Description</th></tr></thead><tbody><tr><td><code>_</code></td><td>string</td><td>No</td><td></td><td>Unused. Present only to satisfy the abilities adapter, which rejects a truly empty input schema.</td></tr></tbody></table></figure></section><section class=\"lh_portfolio-ability-reference-ability\" id=\"ability-repair-sourced-attributes\"><h2>Repair Sourced Attributes</h2><p class=\"lh_portfolio-ability-reference-meta\"><code>lh-mcp-content-transformer/repair-sourced-attributes</code> <span class=\"lh_portfolio-ability-reference-annotation lh_portfolio-ability-reference-annotation-destructive\">Destructive</span> <span class=\"lh_portfolio-ability-reference-annotation lh_portfolio-ability-reference-annotation-idempotent\">Idempotent</span></p><p>Removes sourced attributes, such as the rich-text content of paragraph, heading and list-item blocks, from the block comment delimiters of existing posts, and saves the result. The block editor reads these attributes from the saved HTML and never writes them into the delimiter; when they are there, WordPress raises a <code>rest_validate_value_from_schema</code> 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 <code>attributes_removed</code> for each repaired post. Requires <code>edit_posts</code>, plus <code>edit_post</code> on each post.</p><figure class=\"wp-block-table lh_portfolio-ability-reference-params\"><table><thead><tr><th>Parameter</th><th>Type</th><th>Required</th><th>Default</th><th>Description</th></tr></thead><tbody><tr><td><code>ids</code></td><td>array of integer</td><td>Yes</td><td></td><td>Post IDs to repair. Works on any post type.</td></tr><tr><td><code>confirmed</code></td><td>boolean</td><td>No</td><td></td><td>Required to be true for this call to repair any live post among the given IDs &#8211; any status other than draft, pending or auto-draft. Ignored for those three, which never need it.</td></tr></tbody></table></figure></section></div>"^^rdf:XMLLiteral ;
  sioc:content "Part of: LH MCP Content Transformerconvert-from-blocks Convert from Blocksconvert-post-to-blocks Convert Post to Blocksconvert-to-blocks Convert to Blocksget-pattern-guide Get Pattern Guiderepair-sourced-attributes Repair Sourced AttributesConvert from Blockslh-mcp-content-transformer/convert-from-blocks Read-only IdempotentConverts 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.ParameterTypeRequiredDefaultDescriptioncontentstringYesExisting Gutenberg block markup (e.g. a post&#039;s raw post_content) to convert.target_formatstringYesFormat to convert the block markup into. One of: html, markdown.optionsobjectNoOptional passthrough context for the transformer (e.g. strict/allow_fallbacks).Convert Post to Blockslh-mcp-content-transformer/convert-post-to-blocks Destructive IdempotentConverts the raw-HTML post_content of existing posts into native Gutenberg block markup and saves it, 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.ParameterTypeRequiredDefaultDescriptionidsarray of integerYesPost IDs to convert. Works on any post type.confirmedbooleanNoRequired to be true for this call to convert any live post among the given IDs &#8211; any status other than draft, pending or auto-draft. Ignored for those three, which never need it.Convert to Blockslh-mcp-content-transformer/convert-to-blocks Read-only IdempotentConverts 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.ParameterTypeRequiredDefaultDescriptioncontentstringYesThe HTML or Markdown source content to convert.source_formatstringYesFormat of the supplied content. Use &quot;html&quot; for anything needing layout, styling, media, buttons, or other structure markdown cannot express; use &quot;markdown&quot; for plain prose. One of: html, markdown.optionsobjectNoOptional passthrough context for the transformer (e.g. strict/allow_fallbacks).Get Pattern Guidelh-mcp-content-transformer/get-pattern-guide Read-only IdempotentReturns reference data for convert-to-blocks: 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.ParameterTypeRequiredDefaultDescription_stringNoUnused. Present only to satisfy the abilities adapter, which rejects a truly empty input schema.Repair Sourced Attributeslh-mcp-content-transformer/repair-sourced-attributes Destructive IdempotentRemoves sourced attributes, such as the rich-text content of paragraph, heading and list-item blocks, from the block comment delimiters of existing posts, and saves the result. 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.ParameterTypeRequiredDefaultDescriptionidsarray of integerYesPost IDs to repair. Works on any post type.confirmedbooleanNoRequired to be true for this call to repair any live post among the given IDs &#8211; any status other than draft, pending or auto-draft. Ignored for those three, which never need it." ;
  sioc:topic <https://lhero.org/?taxonomy=author&term=cap-1> .

<https://lhero.org/author/1/#account> rdfs:seeAlso <https://lhero.org/author/1/?feed=lhrdf&format=turtle> .
<https://lhero.org/?taxonomy=author&term=cap-1> rdfs:seeAlso <https://lhero.org/?taxonomy=author&term=cap-1&feed=lhrdf&format=turtle> .
