Skip to main content
Glama
Laravel MCP Companion

Laravel MCP Companion

read_laravel_doc_section

Read-onlyIdempotent

Reads a single section of a Laravel documentation page by filename and heading or anchor, returning only that section's markdown to keep token usage low instead of loading the whole page.

Instructions

Read one section of a documentation page.

Give it a search result's file (as filename) and section, and it returns that section's markdown and nothing else. This is the cheap way to read: a whole page such as queues.md runs to tens of thousands of tokens, and an answer usually needs one section of it.

section may be an anchor ("dealing-with-failed-jobs"), a heading ("Dealing With Failed Jobs") or a heading written as a slug. If the section is not found, the error lists the sections the page does have.

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": {
      "filename": "<filename>",
      "section": "<section>"
    },
    "name": "read_laravel_doc_section"
  }
}

Input Schema

NameRequiredDescriptionDefault
sectionYesThe section's anchor or heading, as search returns it
versionNoLaravel version for a framework page named without one. Ignored for service, package and learning pages
filenameYesThe page, as search returns it: "queues.md", "12.x/queues.md" or "forge/servers/php.md"

Output Schema

NameRequiredDescriptionDefault
fileYes
corpusNoThe service, package or learning source, for any other page
contentYesThe section as markdown; the same text as the result's text content
headingYes
sectionYes
versionNoLaravel version, for a framework page

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.15.0

TDQS

A4.1/5.0
Behavior3/5

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

Annotations already declare readOnlyHint and idempotentHint, so safety is covered. The description adds useful behavior beyond them: the return is markdown only, and a missing section produces an error listing the page's available sections. It does not discuss cost boundaries or failure modes beyond that, so it is solid but not rich.

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?

Four short paragraphs, front-loaded with the purpose, then input sourcing, then the format flexibility, then error behavior. Every sentence carries information; only the token-cost justification is slightly verbose.

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

Completeness4/5

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

An output schema exists, so return structure need not be described; the description still adds the key behavioral facts an agent needs (markdown-only return, section-miss error behavior, accepted section formats). Complete for a simple read tool.

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, but the description adds real meaning: `section` accepts an anchor, a heading, or a slug form, and `filename` comes from a search result's `file`. That format flexibility is not obvious from the schema alone.

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 ("Read one section of a documentation page") and bounds the scope explicitly with "returns that section's markdown and nothing else." An agent can immediately distinguish this from a whole-page or search tool.

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

Usage Guidelines4/5

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

Gives a clear when-to-use rationale: a whole page runs to tens of thousands of tokens and an answer usually needs one section, so this is "the cheap way to read." It also tells the agent to source inputs from a search result. It does not explicitly name search_laravel_docs as the companion, but the context is clear.

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