Skip to content

v2.1.1 — Laravel Boost subprocess compatibility

Choose a tag to compare

@BrunosCode BrunosCode released this 30 Apr 10:42
· 26 commits to main since this release

Fixed

  • MCP tools now return Response (text content with JSON-encoded payload) instead of ResponseFactory (structured content). This fixes a BadMethodCallException: Method Laravel\Mcp\ResponseFactory::isError does not exist raised when the tools are executed in a subprocess by laravel/boost's ExecuteToolCommand, which assumes a Response return value and calls ->isError() on it directly.

The payload is preserved — clients that read the content[0].text field can still json_decode it. The trade-off is the loss of the formal MCP structuredContent field in the JSON-RPC response, which is required until laravel/boost is patched upstream to handle ResponseFactory (see vendor/laravel/boost/src/Console/ExecuteToolCommand.php).

Tests

  • All 7 MCP tools updated and re-tested (Response instead of ResponseFactory, payload extracted via json_decode((string) $response->content(), true))
  • New BoostExecuteToolCompatibilityTest simulates the boost subprocess flow: invokes handle() then isError() on every tool

Compatibility

  • No breaking changes for direct MCP server usage
  • The 7 tools introduced in v2.1.0 keep their schemas and parameter contracts