# elementor/4.3.1/modules/mcp/abilities/utils/document-mutation-links.php

Elementor Website Builder – more than just a page builder, version 4.3.1. 44 lines.

- Page: https://pluginprobe.com/plugins/elementor/4.3.1/code/modules/mcp/abilities/utils/document-mutation-links.php
- Raw: https://pluginprobe.com/plugins/elementor/4.3.1/raw/modules/mcp/abilities/utils/document-mutation-links.php
- Modified: 2026-09-01T11:47:36+00:00

Line numbers below start at 1. Link to a line or a range by appending a fragment to the
page URL, for example `https://pluginprobe.com/plugins/elementor/4.3.1/code/modules/mcp/abilities/utils/document-mutation-links.php#L10-L20`.

```php
<?php

namespace Elementor\Modules\Mcp\Abilities\Utils;

use Elementor\Core\Base\Document;

if ( ! defined( 'ABSPATH' ) ) {
	exit;
}

class Document_Mutation_Links {

	public static function preview_schema_property(): array {
		return Document_Preview_Url::output_schema_property();
	}

	public static function llm_instructions_schema_property(): array {
		return [
			'type' => 'string',
			'description' => 'Mandatory next step: include this text (with the preview link) in your reply to the user.',
		];
	}

	public static function for_document( Document $document, ?string $success_message = null ): array {
		$preview_url = Document_Preview_Url::for_document( $document );

		return [
			'preview_url' => $preview_url,
			'llm_instructions' => self::build_llm_instructions( $preview_url, $success_message ),
		];
	}

	private static function build_llm_instructions( string $preview_url, ?string $success_message = null ): string {
		$prefix = $success_message ?? __( 'Change saved.', 'elementor' );

		return sprintf(
			/* translators: 1: Success message, 2: Preview URL the LLM must share with the user. */
			__( '%1$s You MUST show the user this preview link in your reply (they must be logged into WordPress as an editor): %2$s', 'elementor' ),
			$prefix,
			$preview_url
		);
	}
}

```
