Add enum property to contentType in MCP Content plugin schema
>>> [!note] Migrated issue <!-- Drupal.org comment --> <!-- Migrated from issue #3545337. --> Reported by: [loureirodev](https://www.drupal.org/user/1305546) Related to !31 >>> <h3 id="summary-problem-motivation">Problem/Motivation</h3> <p>MCP clients are not able to infer the possible values for the contentType field, so they often make requests using random values (usually page or article as suggested by the field description). However, if there are other enabled content types, these are not "discovered" by the clients, leading to incomplete or incorrect usage of the MCP server.</p> <h4 id="summary-steps-reproduce">Steps to reproduce</h4> <ol> <li>Add a new content type different from page or article.</li> <li>Make a query about the content from an MCP client (e.g., Claude, Cursor, etc.).</li> <li>Observe that the client is not able to search using the newly enabled content type.</li> </ol> <h3 id="summary-proposed-resolution">Proposed resolution</h3> <p>Add the enum property to the contentType definition, limiting the allowed values to the content types enabled in the configuration.</p> <h3 id="summary-remaining-tasks">Remaining tasks</h3> <ul> <li>Verify that the enum property is generated correctly according to the configuration.</li> <li>Test to ensure that only valid values are used by the MCP Client.</li> </ul> <h3 id="summary-ui-changes">User interface changes</h3> <p>No user interface changes.</p> <h3 id="summary-api-changes">API changes</h3> <p>The definition of the contentType property now includes an enum restriction with the allowed values.</p> <h3 id="summary-data-model-changes">Data model changes</h3> <p>No data model changes.</p>
issue