Skip to main content
Glama

get_document_outline

Read-only

Extract a read-only structural outline of DOCX headings, with paragraph IDs, text, levels, and sources; optionally include heuristic headings.

Instructions

Get a compact structural map of a document's headings (DOCX only). Each entry is {paragraph_id, text, level, source}. Deterministic sources are word_style, list_metadata, and outline_level, selected in that precedence order and included by default. Heuristic sources are run_in_header, title_with_period, title_with_colon, title_caps_centered, and title_bare; set include_heuristic_headings=true to include them. JSON preserves levels 1-9; Markdown clamps visual ATX depth to 6. Read-only.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
formatNoOutput format: 'json' (default, structured outline array) or 'markdown' (indented ATX outline under `content`).
file_pathNoPath to the DOCX file.
include_heuristic_headingsNoWhen true, also include heuristic title/run-in/centered-caps headings alongside deterministic word_style, list_metadata, and outline_level headings. Default: false (all deterministic sources only).

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv0.21.2
    • changedInput schema / properties / include_heuristic_headings / description
      Previous value: -"When true, also include heuristically-detected headings (manual title / run-in / centered-caps) alongside Word HeadingN styles. Default: false (style-based only)."New value: +"When true, also include heuristic title/run-in/centered-caps headings alongside deterministic word_style, list_metadata, and outline_level headings. Default: false (all deterministic sources only)."
  2. Addedv0.16.0

TDQS

A3.8/5.0
Behavior4/5

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

Annotations already cover the safety profile (readOnly, non-destructive), so 'Read-only' is redundant. The description earns credit elsewhere: it discloses the deterministic-vs-heuristic source split, the precedence order word_style > list_metadata > outline_level, and that Markdown clamps ATX depth to 6 while JSON preserves 1-9.

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?

Purpose and scope are front-loaded, and the sentence enumerating source types is dense but each element carries information. The source lists are long, but they define the actual selection contract, so little is wasted.

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, the description carries the return-value burden and does so by specifying the entry shape {paragraph_id, text, level, source} and the format-dependent level behavior. Minor gaps remain (no pagination/size hints for large documents), but it is largely complete for a 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 baseline is 3, but the description adds meaning beyond the schema: the precedence order governing the deterministic sources and the level-preservation difference between json and markdown formats. This genuinely clarifies parameter effects rather than restating them.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb and resource ('Get a compact structural map of a document's headings') and scopes it ('DOCX only'), so an agent can distinguish it from siblings like get_sections or read_file. It stops short of explicitly naming an alternative, so it doesn't reach the top of the scale.

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

Usage Guidelines3/5

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

It gives the DOCX-only constraint and explains when to flip include_heuristic_headings=true, which implies usage. However, it never states when NOT to use this tool or which sibling to reach for instead (e.g., get_sections for full content), leaving routing to inference.

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