Skip to main content
Glama

get_section_excerpts

Read-only

Fetch previews for multiple documentation sections in one batch call against a single index load, with per-id error reporting and aggregated token savings.

Instructions

v1.49+ — batch counterpart to get_section_excerpt. Resolves N previews in one call against a single index load. Per-id errors reported in-line. _meta.tokens_saved aggregates byte savings across the batch. Previews are truncated by design; read full content with get_sections.

Input Schema

NameRequiredDescriptionDefault
repoYesRepository identifier
max_bytesNoPer-section soft cap in UTF-8 bytes.
section_idsYesList of section IDs. Order preserved; each entry carries `requested_id` for correlation. v1.147+ — an entry may be a `doc.md#anchor` reference; an ambiguous one sets `anchor_ambiguous`, `anchor_scope`, `anchor_match_count`, `anchor_candidates` (at most 20), `anchor_candidates_truncated` and `warning` on its entry and at top level.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv1.147.0
    • changedInput schema / properties / section_ids / description
      Previous value: -"List of section IDs. Order preserved; each entry carries `requested_id` for correlation."New value: +"List of section IDs. Order preserved; each entry carries `requested_id` for correlation. v1.147+ — an entry may be a `doc.md#anchor` reference; an ambiguous one sets `anchor_ambiguous`, `anchor_scope`, `anchor_match_count`, `anchor_candidates` (at most 20), `anchor_candidates_truncated` and `warning` on its entry and at top level."
  2. Addedv1.118.0
  3. Removedv1.100.0
  4. First observedv1.66.3

TDQS

A4.1/5.0
Behavior4/5

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

Annotations only carry readOnlyHint=true, so the description must add the rest, and it does: single index load efficiency, per-id error reporting in-line, _meta.tokens_saved aggregation, and intentional truncation. This goes well beyond the safety hint, though it omits any pagination/limit behavior for very large batches.

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 identity ('batch counterpart to get_section_excerpt') then the key behavioral facts in terse sentences. The version tags (v1.49+) are mild noise, but overall it is efficient and well-ordered.

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?

With no output schema and no destructive/param annotations to lean on, the description still conveys return-relevant behavior (_meta.tokens_saved, per-id errors) and truncation semantics, making it callable without opening anything else. Only minor gaps remain (batch size limits).

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 repo, max_bytes, and section_ids are already documented (including the doc.md#anchor behavior). The description adds no parameter-level detail beyond what the schema provides, so the baseline 3 applies.

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+resource (resolves batch section excerpts) and explicitly distinguishes itself from siblings: it is the 'batch counterpart to get_section_excerpt' and points to get_sections for full content. An agent can differentiate it from get_section_excerpt, get_sections, and get_section_summaries by the batch/preview framing alone.

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?

Clearly routes the agent: use this for N previews in one call, and use get_sections for full content ('Previews are truncated by design; read full content with get_sections'). It names the alternative and the condition, though it doesn't spell out the when-not relative to get_section_excerpt beyond the batch framing.

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