Skip to main content
Glama

get_document_outline

Read-only

Retrieve a compact structural map of a DOCX file's headings to quickly identify sections and scope targeted edits without scanning the entire document.

Instructions

Get a compact structural map of a document's headings (DOCX only). Returns one entry per heading paragraph with its text, outline level, source, and stable _bk_* paragraph_id — so an agent can read the cheap outline first, then scope a targeted read_file/replace_text to the right section instead of scanning the whole body. Style-based (Word HeadingN) headings only by default; set include_heuristic_headings=true to also include heuristic titles/run-in headers. 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 heuristically-detected headings (manual title / run-in / centered-caps) alongside Word HeadingN styles. Default: false (style-based only).
Behavior5/5

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

Description adds value beyond annotations by detailing that it returns one entry per heading with text, outline level, source, and paragraph_id, and explains the difference between style-based and heuristic headings. Annotations already declare readOnlyHint=true and destructiveHint=false; description reinforces read-only nature without 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?

Two sentences, front-loaded with purpose, no fluff. Every sentence earns its place, efficiently communicating key information.

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?

Despite lacking an output schema, the description fully explains the return structure and parameter effects. Covers all relevant behavioral aspects for a read-only outline tool.

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

Parameters5/5

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

All three parameters (format, file_path, include_heuristic_headings) are explained in the description with additional context on default values and behavior, complementing the schema coverage of 100%.

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?

Description specifies verb 'Get', resource 'compact structural map of a document's headings', and includes domain 'DOCX only'. Distinguishes from siblings like read_file and replace_text by targeting outlines specifically.

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?

Explicitly tells when to use: 'read the cheap outline first, then scope a targeted read_file/replace_text'. Also states 'DOCX only' and explains the default behavior for style-based vs heuristic headings, providing clear context for agent decision-making.

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/UseJunior/safe-docx'

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