VOOZH about

URL: https://deepwiki.com/invokable/laravel-boost-copilot-cli/3.3-development-and-debugging-tools

⇱ Development and Debugging Tools | invokable/laravel-boost-copilot-cli | DeepWiki


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

Development and Debugging Tools

This document covers the Laravel Boost MCP tools designed for interactive development and debugging tasks. These tools allow GitHub Copilot CLI to inspect application state, execute code, query databases, and troubleshoot issues in real-time.

The tools covered here are: tinker, database-query, database-schema, browser-logs, and get-absolute-url. For information about documentation search capabilities, see Documentation Search. For tool availability across different environments, see Tool Availability by Environment.

Tool Purpose and Use Cases

Laravel Boost provides several MCP tools that enable AI-assisted debugging and inspection of running Laravel applications:

ToolPrimary PurposeWhen to Use
tinkerExecute arbitrary PHP codeDebugging code logic, querying Eloquent models, testing methods
database-queryRead-only SQL queriesInspecting database contents without modification
database-schemaInspect table structureUnderstanding schema before writing migrations or models
browser-logsRead browser console outputDebugging frontend errors and JavaScript exceptions
get-absolute-urlGenerate correct application URLsEnsuring proper scheme, domain, and port in shared links

These tools are essential for GitHub Copilot CLI to understand application state and provide contextual assistance during development.

Sources: .github/instructions/laravel-boost.instructions.md79-111

Tool Interaction Flow


Sources: .github/instructions/laravel-boost.instructions.md93-111

The Tinker Tool

The tinker tool executes arbitrary PHP code in the context of the Laravel application, providing direct access to the application's state, Eloquent models, and services.

Primary Use Cases

According to the AI guidelines, the tinker tool should be used when Copilot needs to:

  • Execute PHP code to debug application logic
  • Query Eloquent models directly
  • Test method behavior interactively
  • Inspect object properties and relationships
  • Verify business logic execution

The guidelines explicitly state: "You should use the tinker tool when you need to execute PHP to debug code or query Eloquent models directly."

Tool Invocation Pattern


Environment Limitations

The tinker tool requires a full Laravel application context. In Orchestra Testbench environments (package development), this tool has limited functionality because:

  • No application-specific models are available
  • Database connections may not be configured
  • Application services may not be registered

The guidelines note: "This is a Laravel package development project using Orchestra Testbench, not a standard Laravel application. The environment differs significantly from a typical Laravel project - there is no full application context, database, or application-specific models."

Sources: .github/instructions/laravel-boost.instructions.md93-97 .github/instructions/laravel-boost.instructions.md16-25

Database Inspection Tools

The database-query Tool

The database-query tool executes read-only SQL queries against the application's database. This tool is designed for inspection purposes only and cannot modify data.

When to Use

The guidelines specify: "Use the database-query tool when you only need to read from the database."

This tool is appropriate for:

  • Verifying data exists in tables
  • Checking record counts
  • Inspecting column values
  • Validating query results

Comparison with Tinker

Aspectdatabase-querytinker
SyntaxRaw SQLPHP/Eloquent
ScopeDatabase onlyFull application
MutationsRead-onlyCan modify
ComplexitySimple queriesComplex logic

The decision logic is: use database-query for simple data inspection, use tinker for complex queries involving Eloquent relationships or application logic.

Sources: .github/instructions/laravel-boost.instructions.md93-97

The database-schema Tool

The database-schema tool inspects table structure, providing column definitions, types, indexes, and foreign keys.

When to Use

The guidelines state: "Use the database-schema tool to inspect table structure before writing migrations or models."

Typical use cases include:

  • Understanding existing table structures
  • Verifying column types before model casts
  • Checking indexes before query optimization
  • Reviewing foreign key constraints

This tool helps Copilot understand the database schema context before generating:

  • Migration files that modify tables
  • Eloquent model definitions with proper casts
  • Query builder calls with correct column names
  • Relationship definitions based on foreign keys

Environment Availability

Both database tools may have limited functionality in Orchestra Testbench environments:

"Tools that depend on database connections, specific models, application routes, or other application-specific features may not be available or may fail. Tools like database-query, database-schema, list-routes may return limited or no results."

Sources: .github/instructions/laravel-boost.instructions.md96-97 .github/instructions/laravel-boost.instructions.md19-22

Database Tool Selection Matrix


Sources: .github/instructions/laravel-boost.instructions.md93-97

The browser-logs Tool

The browser-logs tool reads browser console output, including JavaScript errors, warnings, and exceptions. This enables Copilot to diagnose frontend issues without requiring the developer to manually copy console output.

When to Use

The guidelines specify: "You can read browser logs, errors, and exceptions using the browser-logs tool from Boost. Only recent browser logs will be useful - ignore old logs."

This tool is essential for:

  • Debugging JavaScript errors
  • Diagnosing Vue/React component issues
  • Investigating network request failures
  • Understanding browser-side exceptions

Temporal Considerations

The tool emphasizes recency: only recent browser logs should be considered relevant. This design acknowledges that:

  • Browser consoles accumulate noise over time
  • Old logs may reflect already-fixed issues
  • Recent logs correlate with current user-reported problems

Integration with Frontend Debugging


Sources: .github/instructions/laravel-boost.instructions.md99-102

The get-absolute-url Tool

The get-absolute-url tool generates properly formatted URLs for the Laravel application, ensuring correct scheme (http/https), domain/IP address, and port configuration.

When to Use

The guidelines state: "Whenever you share a project URL with the user, you should use the get-absolute-url tool to ensure you're using the correct scheme, domain/IP, and port."

This tool is critical because Laravel applications run in diverse environments:

EnvironmentTypical URL PatternPort Considerations
Local Developmenthttp://localhost:8000Custom port via php artisan serve
Valethttp://myapp.testPort 80 (implicit)
Homesteadhttp://192.168.56.56Port 80 or custom
Docker/Sailhttp://localhostPort mapping varies
WSLhttp://172.x.x.xDynamic IP, various ports

Why Manual URL Construction Fails

Without get-absolute-url, Copilot might generate incorrect URLs by:

  • Assuming localhost when the app uses a custom domain
  • Using http when the app requires https
  • Omitting port numbers for non-standard configurations
  • Using incorrect IP addresses in containerized environments

The tool queries the Laravel application's actual configuration (config('app.url')) and environment detection to provide accurate URLs.

Sources: .github/instructions/laravel-boost.instructions.md89-91

Tool Selection Decision Tree

The AI guidelines provide clear decision logic for selecting the appropriate development and debugging tool:


Sources: .github/instructions/laravel-boost.instructions.md89-97

Practical Usage Patterns

Pattern 1: Pre-Migration Schema Inspection

Before generating a migration to modify a table:

  1. Copilot invokes database-schema with the table name
  2. Reviews existing columns, types, and constraints
  3. Generates migration that preserves existing attributes
  4. Avoids accidentally dropping columns or indexes

This pattern addresses the Laravel 12 guideline: "When modifying a column, the migration must include all of the attributes that were previously defined on the column. Otherwise, they will be dropped and lost."

Pattern 2: Model-First Data Verification

When debugging model behavior:

  1. Use database-query to verify raw data exists
  2. Use tinker to test Eloquent model queries
  3. Compare results to identify ORM-specific issues
  4. Verify relationships load correctly

Pattern 3: Frontend-Backend Error Correlation

When diagnosing full-stack issues:

  1. Use browser-logs to capture frontend errors
  2. Use tinker to verify backend data/logic
  3. Correlate timestamps between frontend errors and backend state
  4. Identify disconnect points in the data flow

Pattern 4: URL Sharing for Browser Testing

When providing URLs for manual testing:

  1. Always invoke get-absolute-url with the route path
  2. Include query parameters or fragments if needed
  3. Ensure user can directly click/copy the correct URL
  4. Avoid environment-specific hardcoded URLs

Sources: .github/instructions/laravel-boost.instructions.md89-111

Environment-Specific Behavior

The behavior and availability of these tools varies significantly by environment:

Standard Laravel Application

All tools function normally:

  • tinker: Full access to models, services, helpers
  • database-query: Queries configured database
  • database-schema: Inspects all application tables
  • browser-logs: Collects from running application
  • get-absolute-url: Returns application's configured URL

Orchestra Testbench (Package Development)

Limited functionality:

  • tinker: Basic PHP execution only, no application models
  • database-query: May fail if no database configured
  • database-schema: Limited to test database tables if any
  • browser-logs: Not applicable (no browser context)
  • get-absolute-url: May return test environment URL

The guidelines explicitly warn: "Not all Laravel Boost MCP tools will work correctly in this environment: Tools that depend on database connections, specific models, application routes, or other application-specific features may not be available or may fail."

For detailed environment-specific configurations and workarounds, see Tool Availability by Environment.

Sources: .github/instructions/laravel-boost.instructions.md16-25

Integration with Other MCP Tools

These development and debugging tools complement other Laravel Boost MCP capabilities:

Tool CategoryRepresentative ToolsHow They Work Together
Documentationsearch-docsUse docs to learn API, then verify with tinker
Code Generationlist-artisan-commandsCheck available commands, test with tinker
Schema Toolsdatabase-schemaInspect schema, query data with database-query
Testingpest-testing skillWrite tests based on tinker explorations

For example, a typical workflow might be:

  1. Use search-docs to understand a Laravel feature
  2. Use database-schema to see current table structure
  3. Use tinker to test the feature interactively
  4. Generate code based on verified behavior
  5. Use browser-logs to verify frontend integration

Sources: .github/instructions/laravel-boost.instructions.md79-111

Refresh this wiki

On this page