Skip to main content
Glama
Laravel MCP Companion

Laravel MCP Companion

search_laravel_docs

Read-onlyIdempotent

Search Laravel documentation and get ranked sections that answer your question, covering framework, first-party services, packages, and learning resources. Use it first for any Laravel question, then read the matching section.

Instructions

Search Laravel's documentation and get back the sections that answer the question.

Covers every corpus on this server at once: the framework docs for the selected Laravel version, the first-party services (Forge, Vapor, Envoyer, Nova, Cloud, Nightwatch, Herd), fetched package docs (Livewire, Filament, Inertia, Spatie and others) and learning resources. Each result names a file and a section; pass them to read_laravel_doc_section as filename and section to read just that section.

Use it first for any Laravel question. Narrow with sources when you know the corpus, and set version for an older Laravel release. Results are ranked across corpora, and no single source takes the whole page when others match. Nothing found is a normal result with count 0.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "query": "<query>"
    },
    "name": "search_laravel_docs"
  }
}

Input Schema

NameRequiredDescriptionDefault
limitNoHow many results to return, 1 to 20. Default 5
queryYesWhat to look for, as a question or as keywords
sourcesNoRestrict the search to any of "core", "services", "packages", "learning". Default: all four
versionNoLaravel version for the framework docs (e.g. "12.x"). Defaults to the server's configured version. Services, packages and learning resources are not Laravel-versioned.
all_versionsNoSearch every Laravel version instead of one

Output Schema

NameRequiredDescriptionDefault
countYesHow many results follow; 0 when nothing matched
queryYes
scopeYesThe Laravel versions searched, comma-separated
resultsYes
sourcesYes
matched_needsNoCommon tasks recognised in the query, whose usual documentation pages were favoured

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.15.0

TDQS

A4.8/5.0
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations only declare readOnlyHint and idempotentHint; the description adds genuinely new behavior — results are ranked across corpora with no single source dominating the page, and an empty result set is a normal outcome with count 0, not an error. That empty-result contract is exactly the kind of thing an agent cannot infer from structured fields.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Front-loaded with the core action and the search-vs-read distinction before the corpus inventory. The long enumeration of first-party services is somewhat listy, but each item helps an agent decide whether to scope `sources`, so it mostly earns its space.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a five-parameter search tool with a full input schema, complete schema descriptions, and an output schema, nothing an agent needs is missing: what it searches, how to narrow, how to chain into the read tool, and how to interpret zero results.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so the baseline is 3. The description still adds value: it explains why `version` matters ('set `version` for an older Laravel release'), reinforces that only framework docs are versioned, and maps result fields to another tool's parameters. It does not mention `all_versions` or `limit` at all, leaving that one gap.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb and resource ('Search Laravel's documentation') plus what comes back ('the sections that answer the question'). It also enumerates the exact corpora covered and explicitly distinguishes itself from read_laravel_doc_section by describing the search-vs-read split.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Gives a direct default ('Use it first for any Laravel question'), then conditions for narrowing (`sources`) and for older releases (`version`). The handoff is explicit: take `file`/`section` from a result and pass them to read_laravel_doc_section as `filename`/`section`.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.