Skip to main content
Glama

Get document section

get-document-section
Read-onlyIdempotent

Read a document section by ID, a window at a time. Use this after search-documents to read the text behind a hit before answering from it.

WHEN TO USE:

  • After search-documents returns results, use the document_id from a hit to read the section

  • When you need the text of an MD&A, risk factor, or business description

  • To read the full context around a search snippet

PARAMETERS:

  • document_id (required) — from a search-documents hit, or the next_document_id of a part

  • offset — character offset to start from (default 0)

  • length — characters to return (default 4000, max 8000)

RETURNS:

  • content — the requested window. content_length is the whole part, and next_offset is present when more of it follows: call again with it as offset to read on rather than answering from a partial read

  • Entity, filing, and section metadata

  • A long section is stored in parts of about 25K characters: the result is one part (part of part_count, section_label like "MD&A (2/6)") and carries next_document_id — call again with it to read the next part; parent_document_id is shared by the section's parts

  • content_url for the CDN-hosted clean text (when available)

  • For iXBRL disclosures: xbrl_elements, the XBRL fact tags in this section — use resolve-element or read-graph-cypher to cross-reference with the knowledge graph

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": {
      "document_id": "<document_id>"
    },
    "name": "get-document-section"
  }
}

Input Schema

NameRequiredDescriptionDefault
lengthNoCharacters to return (default 4000, max 8000)
offsetNoCharacter offset to start from (default 0); pass a result's next_offset to read on
document_idYesDocument ID from a search-documents result, or the next_document_id of a part

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.6/5.0
Behavior4/5

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

Annotations already declare readOnlyHint, idempotentHint, and destructiveHint=false, so safety is covered. The description adds substantial behavior beyond that: windowing via offset/length, next_offset continuation, the ~25K-character part scheme with part_count and section_label, next_document_id for chaining parts, parent_document_id sharing, content_url availability, and the explicit warning not to answer from a partial read. It stops short of stating cost or latency implications of repeated calls, but the paging semantics are fully disclosed.

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?

Lead sentence states purpose and scope first, then WHEN TO USE, PARAMETERS, and RETURNS sections make it scannable. The PARAMETERS block largely restates the schema (default 4000, max 8000, default 0) which is mild duplication, but the RETURNS section's length is justified by the absence of an output schema.

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 no output schema, the description carries the entire burden of explaining return values, and it does so thoroughly: content, content_length, next_offset, part/part_count/section_label, next_document_id, parent_document_id, content_url, and xbrl_elements with a pointer to resolve-element or read-graph-cypher. For a three-parameter paging read tool, nothing an agent needs to call it correctly is missing.

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 parameter definitions are already documented. The description nonetheless adds provenance semantics the schema only gestures at, tying document_id to either a search hit or a part's next_document_id and framing offset as 'pass a result's next_offset to read on,' which tells the agent how the values are meant to be chained across calls.

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 opening sentence gives a specific verb and resource (read a document section by ID) plus the operative constraint (a window at a time), which immediately distinguishes it from a whole-document read and from search-documents. An agent knows exactly what it retrieves without opening the 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?

The WHEN TO USE block gives three concrete triggers, including the sequencing rule 'after search-documents returns results, use the document_id from a hit,' and names the specific content types (MD&A, risk factors, business description). It also implicitly excludes answering from a search snippet alone by directing the agent to read the text behind a hit.

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.