Skip to main content
Glama

Read a section of an agent doc page

read_section
Read-onlyIdempotent

Read a page found by search_docs.

Without a heading: the page's description and outline (top-level sections with subsection counts). With a heading: that section's full text, including its subsections; continue long sections with next_offset. outline_depth=3 also lists subsections; use it only on long pages to find one specific subsection.

Input Schema

NameRequiredDescriptionDefault
urlYesPage URL exactly as search_docs returned it.
offsetNoCharacter offset into the section; pass the previous next_offset to continue a long section.
headingNoHeading to read, as listed in the outline (leading #s optional). Exact text first, case-insensitive, then a unique partial match; use 'Parent > Heading' when two headings share a name. Leave unset to get the page's outline.
outline_depthNoOutline depth when no heading is given: 2 lists top-level sections with subsection counts, 3 also lists the subsections.

Output Schema

NameRequiredDescriptionDefault
urlYesPage URL.
textYesSection markdown from its heading to the next heading of the same or higher level, at most 8,000 characters per call.
titleYesPage title.
offsetYesOffset of `text` within the section.
headingYesPath of the section returned, e.g. 'Hooks > PreToolUse'; null when only the outline was asked for.
outlineYesTop-level sections as '## Text (N subsections)' when no heading was asked for (at most 40 lines, then '+N more sections'); empty otherwise.
descriptionYesOne sentence on what the page is.
next_offsetYesPass as offset to read the rest; null when nothing is left.
total_charsYesLength of the whole section.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.5/5.0
Behavior4/5

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

Annotations already declare readOnly, idempotent, non-destructive, and closed-world, so safety is covered; the description adds the genuinely useful behavior of paginated continuation ('continue long sections with next_offset') and what content each mode returns (description + outline vs. full text plus subsections). It stops short of describing result shape details, but an output schema exists to carry those.

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

Conciseness5/5

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

Front-loaded with the core purpose, then the two mode-specific behaviors and the one caveat, in roughly five tight lines. Every clause drives behavior; no filler.

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?

With 100% schema coverage, rich annotations, and an output schema present, the description only needs to add mode selection and pagination — and it does exactly that. Nothing an agent needs to call this correctly is missing.

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

Parameters3/5

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

Schema description coverage is 100%, so url, heading, offset, and outline_depth are already fully documented in the schema, including the exact/case-insensitive/partial heading match and the 'Parent > Heading' disambiguation. The description restates outline_depth and continuation behavior but adds no syntax or semantics beyond the schema, which is the baseline-3 case.

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?

The description states a specific verb and resource (read a page/section) and immediately anchors it to its only sibling: 'Read a page found by search_docs.' It also names the two operating modes (no heading = outline, with heading = section text), so an agent can distinguish this from search_docs without opening a schema.

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?

Explicit conditional routing: omit heading to get the outline, supply heading to get that section's text and subsections. It also warns against over-using outline_depth=3 ('use it only on long pages to find one specific subsection') and points to next_offset for continuation — when-to-use, when-not-to-use, and the alternative tool are all covered.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.