VOOZH about

URL: https://deepwiki.com/invokable/laravel-boost-copilot-cli/3.4-tool-availability-by-environment

⇱ Tool Availability by Environment | invokable/laravel-boost-copilot-cli | DeepWiki


Loading...
Last indexed: 7 March 2026 (397730)
Menu

Tool Availability by Environment

This page describes how the three supported runtime environments — standard Laravel, Laravel Sail, and Orchestra Testbench — affect which Laravel Boost MCP tools produce useful results. The focus is on understanding why certain tools are unavailable or return empty results in Testbench, and which tools are safe to rely on in all environments.

For how the MCP server command differs per environment (e.g., php artisan vs. ./vendor/bin/sail vs. ./vendor/bin/testbench), see Environment-Specific Setup. For a full listing of all tools and their general usage, see Available MCP Tools Overview.


Environments

The package supports three environments, each spawning the boost:mcp process differently:

EnvironmentMCP Server CommandArgs
Standard Laravelphpartisan boost:mcp
Laravel Sail./vendor/bin/sailartisan boost:mcp
Orchestra Testbench./vendor/bin/testbenchboost:mcp

Detection is performed at install time by convertCommandToPhpPath() in src/CopilotCli.php. The Testbench path is selected when defined('TESTBENCH_CORE') returns true src/CopilotCli.php133-140


Tool Availability Matrix

The following table summarizes which tools are available and reliable across environments.

ToolStandard LaravelLaravel SailOrchestra Testbench
application-info✅ Full✅ Full✅ Full
list-artisan-commands✅ Full✅ Full✅ Full
search-docs✅ Full✅ Full✅ Full
get-absolute-url✅ Full✅ Full⚠️ Limited (no running app)
tinker✅ Full✅ Full⚠️ Limited (no app models)
database-query✅ Full✅ Full❌ No results / fails
database-schema✅ Full✅ Full❌ No results / fails
browser-logs✅ Full✅ Full❌ No results
list-routes✅ Full✅ Full❌ No/minimal results

Sources: .github/instructions/laravel-boost.instructions.md16-24 .ai/guidelines/copilot-cli.blade.php11-21


Why Testbench Limits Certain Tools

Orchestra Testbench provides a minimal Laravel bootstrap — enough to run package tests — but it does not provide:

  • A real application database or configured migrations
  • Application-specific Eloquent models
  • A full route table (only routes registered by the package under test)
  • A running web server or browser context

As a result, tools that depend on these application-level resources return empty results or error out when the MCP server runs under ./vendor/bin/testbench boost:mcp.

The guideline template .ai/guidelines/copilot-cli.blade.php11-21 conditionally includes a warning for Copilot CLI when TESTBENCH_CORE is defined:

@if(defined('TESTBENCH_CORE'))
### Laravel Package Development Environment
- Tools like `database-query`, `database-schema`, `list-routes` may return limited or no results.
- Basic tools like `application-info`, `list-artisan-commands`, `search-docs` should work normally.
@endif

This rendered warning is embedded in the installed .github/instructions/laravel-boost.instructions.md file .github/instructions/laravel-boost.instructions.md16-24 informing the AI model in-session about the environment constraints.


Environment Detection: Code Path

Diagram: isRunningInTestbench() and its effect on MCP tool use


Sources: src/CopilotCli.php133-140 src/CopilotCli.php108-122 .ai/guidelines/copilot-cli.blade.php11-21


Detecting the Environment in Code

Diagram: CopilotCli methods involved in environment detection


Sources: src/CopilotCli.php124-140

The isRunningInTestbench() method src/CopilotCli.php133-140 checks for the TESTBENCH_CORE constant, which is automatically defined when running inside Orchestra Testbench. There is no manual configuration required; the constant's presence is sufficient.

The static fake() method src/CopilotCli.php145-149 allows tests to simulate both Testbench and WSL environments by setting $fake_testbench and $fake_wsl on the class without modifying environment variables.


Recommended Workflow in Testbench

When developing a package with Orchestra Testbench, limit MCP tool usage to the tools confirmed to work:

  • Use freely: application-info, list-artisan-commands, search-docs
  • Use vendor/bin/testbench commands instead of php artisan for Artisan operations
  • Do not rely on database-query, database-schema, list-routes, browser-logs, or get-absolute-url — these depend on application infrastructure that Testbench does not provide

These restrictions are also described in the AI guideline file distributed to package users via boost:install, ensuring the AI model itself is aware of them during a Copilot CLI session .github/instructions/laravel-boost.instructions.md15-24