The `general:status` tool in the MCP module fails with a fatal error when the core Update module is not enabled
>>> [!note] Migrated issue <!-- Drupal.org comment --> <!-- Migrated from issue #3570016. --> Reported by: [scott falconer](https://www.drupal.org/user/52557) >>> <h3 id="summary-problem-motivation">Problem/Motivation</h3> <p>The `general:status` tool in the MCP module fails with a fatal error when the core Update module is not enabled:</p> <pre>Fatal error: Call to undefined function update_get_available()</pre><h4 id="summary-steps-reproduce">Steps to reproduce</h4> <p>1. Disable the Update module: `drush pm:uninstall update`<br> 2. Call the `general:status` tool via MCP endpoint<br> 3. Observe the fatal error</p> <h3 id="summary-proposed-resolution">Proposed resolution</h3> <p>Add a check using `$this-&gt;moduleHandler-&gt;moduleExists('update')` before attempting to load the Update module's include file and call its functions. When the module is not enabled, return a graceful JSON response indicating the status is unavailable.</p> <h3>Test Steps</h3> <p>1. Disable the Update module: `drush pm:uninstall update`<br> 2. Call the `general:status` tool via MCP endpoint<br> 3. **Before patch:** Fatal error - Call to undefined function `update_get_available()`<br> 4. **After patch:** JSON response with status `unavailable` and message: "The Update module is not enabled. Enable it to check for module updates."</p> <h3>Notes</h3> <p>- This patch and post were generated with <a href="https://github.com/scottfalconer/drupal-contribute-fix">https://github.com/scottfalconer/drupal-contribute-fix</a>, attaching a video demo of it in action. (video sped up 600%)<br> - Human review after AI coding: Changed verbage of "installed" to "enabled"</p>
issue