visualbuilder/eloquent-schema
Adds MCP tools for Laravel Boost to introspect Eloquent models. Automatically discovers app and vendor models, extracts columns, relationships, and accessors, and serves complete model schemas with caching—helping AI assistants and dev tools generate accurate queries and code faster.
ModelDiscoveryService, ModelSchemaService) enable flexible integration.eloquent-schema:cache, eloquent-schema:discover) handle heavy lifting (e.g., model scanning, cache warming).--max-depth for relationships).max_depth > 1) can consume significant memory. Defaults (max_depth=2) balance completeness and safety.eloquent-schema:clear) is required after model changes. The package provides tools to automate this (e.g., post-migration hooks).AI/ML Strategy:
Vendor Package Scope:
Performance Tradeoffs:
max_depth for relationship introspection? Depth 1 (shallow) is fastest but least informative; depth 3+ may be prohibitive.Adoption Path:
eloquent-schema:cache post-migration)?Long-Term Maintenance:
eloquent-schema:clear runs after schema migrations)?Assessment Phase:
eloquent-schema:discover --list to validate vendor package support.eloquent-schema:cache --max-depth=2 on a staging environment.Pilot Integration:
composer require visualbuilder/eloquent-schema
php artisan vendor:publish --tag=eloquent-schema-config
model_paths, included_packages, and cache_ttl in config/eloquent-schema.php.php artisan eloquent-schema:cache
Core Adoption:
config/boost.php and expose via MCP server:
'mcp' => [
'tools' => [
'include' => [
\Visualbuilder\EloquentSchema\Mcp\Tools\ListModels::class,
\Visualbuilder\EloquentSchema\Mcp\Tools\ModelSchema::class,
],
],
];
$schema = app(ModelSchemaService::class)->getSchema(Order::class);
Vendor Package Onboarding:
php artisan eloquent-schema:discover to identify packages with Eloquent models.included_packages and warm cache.Cache Management:
post-deploy scripts).model_paths and included_packages.eloquent-schema:discover to validate vendor support.cache_ttl.eloquent-schema:cache.included_packages and re-warm cache.max_depth and cache TTL based on performance metrics.eloquent-schema:clear) or via hooks after schema migrations.eloquent-schema:cache into deployment pipelines (e.g., post-migration).config/eloquent-schema.php for drift (e.g., outdated included_packages).eloquent-schema:discover --list to debug missing models.max_depth limits and model customizations (e.g., dynamic properties).model-schema for Copilot prompts").How can I help you explore Laravel packages today?