Skip to main content
Glama

read_document_section

Read-onlyIdempotent

Read a specific section of a document by matching a heading substring. Returns content from that heading to the next heading of same or higher level, including nested subsections.

Instructions

    Reads a specific section of a document identified by
    heading match.

    Uses case-insensitive substring matching against
    headings. Returns the section content from the matched
    heading up to the next heading of the same or higher
    level, including all nested subsections.

    Use this tool when you need to:
    - Read a specific part of a large document
    - Focus on one section without loading everything
    - Navigate by heading name instead of line numbers

    Args:
        document_id: The document ID
        heading: Case-insensitive substring to match
            against headings (e.g. "arch" matches
            "## Architecture")

    Returns:
        Section content with line numbers
    

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
document_idYes
headingYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior5/5

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

Annotations already declare readOnlyHint=true and idempotentHint=true, and the description adds important behavioral details: case-insensitive matching, end boundary condition (next heading of same/higher level), inclusion of nested subsections, and return of line numbers. No contradiction.

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?

The description is well-structured: core function, detailed behavior, use cases, parameter descriptions, and return value. Every sentence adds information; no fluff. Front-loaded with essential purpose.

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?

Given the tool's moderate complexity (2 parameters, clear behavior) and presence of an output schema (covering return values), the description covers all necessary aspects. It omits error conditions but is sufficiently complete for a read-only tool with annotations.

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 description coverage is 0%, so the description provides essential meaning for both parameters: document_id as 'The document ID' and heading with an example of substring matching. This adds value beyond the schema's title fields, though it remains somewhat terse.

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 clearly states the tool reads a specific document section by heading match, with specific matching behavior (case-insensitive substring, returns from matched heading to next same/higher-level heading including nested subsections). This distinguishes it from siblings like read_document (entire document) and get_document_toc (just headings).

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?

The description explicitly lists three use cases for the tool, giving clear guidance on when to use it. However, it does not explicitly state when not to use it or mention alternatives, though the use cases implicitly differentiate from read_document.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/Vortiago/mcp-outline'

If you have feedback or need assistance with the MCP directory API, please join our Discord server