VOOZH about

URL: https://deepwiki.com/invokable/laravel-boost-copilot-cli/3.2-documentation-search-(search-docs)

⇱ Documentation Search (search-docs) | invokable/laravel-boost-copilot-cli | DeepWiki


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

Documentation Search (search-docs)

Purpose and Scope

The search-docs tool is an MCP tool provided by the laravel-boost server that searches version-specific documentation for Laravel and Laravel ecosystem packages. This tool queries a remote Boost API with context about the installed packages and their versions, returning documentation that matches the exact versions in use.

This page documents the search-docs tool's functionality, query syntax, and best practices. For information about other MCP tools, see Available MCP Tools Overview. For general Laravel Boost MCP server configuration, see MCP Configuration File.

Overview

The search-docs tool enables AI agents to retrieve accurate, version-specific documentation before making code changes. Unlike generic documentation searches, this tool automatically sends the application's package manifest to ensure returned results match the installed versions.

Key Capabilities

CapabilityDescription
Version-AwareAutomatically filters results based on installed package versions
Multi-PackageSearches across Laravel framework and ecosystem packages simultaneously
Context-SensitiveReturns only relevant documentation for the current environment
Flexible SyntaxSupports multiple query types (simple, phrase, mixed, multi-query)
Relevance-RankedReturns most relevant results first

Sources: .github/instructions/laravel-boost.instructions.md104-118

Architecture and Data Flow


Search Request Flow:

  1. AI agent determines documentation is needed
  2. GitHub Copilot CLI invokes search-docs tool via MCP protocol
  3. MCP server reads package manifest from Laravel application
  4. Request sent to remote Boost API with package versions and query
  5. API filters documentation corpus to matching versions
  6. Results ranked by relevance and returned
  7. MCP server forwards results to Copilot CLI
  8. AI agent receives version-appropriate documentation

Sources: .github/instructions/laravel-boost.instructions.md104-110

Query Syntax

The search-docs tool supports five distinct query syntax patterns, each designed for different search scenarios.

Query Type Reference


Syntax Details

Syntax TypeFormatBehaviorExample
Simple Wordquery=authenticationAuto-stemming finds variationsMatches authenticate, auth, authentication
Multiple Wordsquery=rate limitAND logic (both terms required)Finds docs containing both rate AND limit
Quoted Phrasequery="infinite scroll"Exact position matchWords must be adjacent in that order
Mixed Queryquery=middleware "rate limit"Combines simple and phrasemiddleware AND exact phrase rate limit
Multiple Queriesqueries=["authentication", "middleware"]ANY logic (either term)Matches docs with ANY of these terms

Sources: .github/instructions/laravel-boost.instructions.md111-118

Best Practices

Query Formulation Guidelines

Use Broad, Simple, Topic-Based Queries:

✅ Good: ['rate limiting', 'routing rate limiting', 'routing']
❌ Bad: ['how to implement rate limiting in Laravel 12 for API routes']

Never Include Package Names:

The tool automatically includes package context based on installed versions.

✅ Good: 'test resource table'
❌ Bad: 'filament 4 test resource table'

Search Before Making Changes:

The guidelines explicitly state to search documentation before code modifications to ensure correct approach.


Use Multiple Related Queries:

When uncertain about terminology, submit multiple broad queries simultaneously. The most relevant results will be returned first.

Example: ['authentication', 'user login', 'session management']

Sources: .github/instructions/laravel-boost.instructions.md106-110

Version-Specific Documentation

How Version Filtering Works


Automatic Package Detection:

The tool reads package versions from the Laravel application's Composer manifest and sends them with every search request. This ensures documentation results match the exact versions installed, preventing issues from following outdated or incompatible examples.

Environment-Specific Context:

In Orchestra Testbench environments, the package manifest reflects the development context rather than a full application. The tool still provides accurate results for the available packages.

Sources: .github/instructions/laravel-boost.instructions.md104-107

When to Use search-docs

Decision Tree


Common Use Cases

ScenarioExample QueriesPurpose
Feature Implementation['routing', 'route parameters', 'route model binding']Understand how to implement routing features
Error Resolution['validation errors', 'form requests']Find documentation about validation error handling
API Design['api resources', 'resource collections']Learn about Eloquent API resource patterns
Testing Setup['database testing', 'factories', 'seeders']Understand testing approaches and helpers
Migration Writing['migrations', 'column types', 'indexes']Find schema builder documentation
Middleware Configuration['middleware', 'route middleware']Learn middleware registration in Laravel 12

Sources: .github/instructions/laravel-boost.instructions.md104-109

Tool Availability

The search-docs tool is available in all environments supported by the Laravel Boost MCP server:

EnvironmentAvailabilityNotes
Standard Laravel✅ AvailableFull package manifest
Laravel Sail✅ AvailableFull package manifest via Docker
WSL✅ AvailableFull package manifest with path conversion
Orchestra Testbench✅ AvailablePackage development context

Unlike database-dependent tools (e.g., database-query, tinker), the search-docs tool works consistently across all environments because it only requires access to the Composer manifest and network connectivity to the Boost API.

Sources: .github/instructions/laravel-boost.instructions.md19-24

Critical Reminders from Guidelines

The AI guidelines emphasize the importance of the search-docs tool:

"Boost comes with a powerful search-docs tool you should use before trying other approaches when working with Laravel or Laravel ecosystem packages."

"CRITICAL: ALWAYS use search-docs tool for version-specific Laravel documentation and updated code examples."

These directives appear in multiple sections of the guidelines, highlighting that documentation search should be the first step when working with framework features.

Sources: .github/instructions/laravel-boost.instructions.md104-110 .github/instructions/laravel-boost.instructions.md215 .github/instructions/laravel-boost.instructions.md250

Integration with MCP Protocol

The search-docs tool is registered as an MCP tool by the laravel-boost server. When GitHub Copilot CLI connects to the MCP server (configured via .github/mcp-config.json), the tool becomes available for AI agents to invoke.

MCP Tool Registration:

  • Tool name: search-docs
  • Server: laravel-boost
  • Protocol: Model Context Protocol (MCP)
  • Transport: stdio

For details on how MCP tools are registered and invoked, see MCP Protocol Integration. For configuration of the MCP server itself, see MCP Configuration File.

Sources: .github/instructions/laravel-boost.instructions.md104-118