Skip to main content
Glama

doc_outline

Read-onlyIdempotent

List every heading in a .docx in document order to build a table-of-contents view, with level, style, text, and address; filter by max level or include notes/headers.

Instructions

List the headings (levels 1-9, by style or outline level) in document order, each with its address, level, style and text: the table-of-contents view. max_level 2 keeps levels 1-2; stories ["body", "notes"] adds headings in notes. Use doc.segment for chapters that are not styled as headings, para.list for every paragraph, para.get to read one heading in full. Read-only; paged: about 8,000 bytes per reply (limit up to 1,000), continue with cursor set to the reply's next.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
docYesPath to the .docx.
limitNoMost items to return; a response is also capped at about 8,000 bytes.
cursorNoThe `next` value of the previous response, to continue the list.
storiesNoStories to read (default ["body"]): "notes" adds footnotes and endnotes, each after the paragraph holding its mark; "headers" adds headers and footers, after the body. Their addresses carry a prefix (fn3/p1#…, hdr1.default/p1#…).
max_levelNoOnly headings up to this level.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
okYesAlways true on success.
opYesThe operation that ran.
apiYesAPI version (1.0).
docNoThe document read or written: path, sha256 and paragraph count.
nextYesCursor for the next page (pass as cursor), or null.
resultYesWhat the operation returns.
warningsYesThings to know about the result.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv0.7.2
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "properties": {
      +    "api": {
      +      "description": "API version (1.0).",
      +      "type": "string"
      +    },
      +    "doc": {
      +      "description": "The document read or written: path, sha256 and paragraph count.",
      +      "properties": {
      +        "characters": {
      +          "description": "text.normalize of a text string: its length.",
      +          "type": "integer"
      +        },
      +        "paragraphs": {
      +          "description": "Body paragraphs.",
      +          "type": "integer"
      +        },
      +        "path": {
      +          "description": "Path of the document.",
      +          "type": "string"
      +        },
      +        "sha256": {
      +          "description": "sha256 of the file (pass as expect.sha256 to a write).",
      +          "type": "string"
      +        },
      +        "source": {
      +          "description": "A .txt/.md/.odt source's format, encoding and split mode; \"text\" for a text string (text.normalize).",
      +          "type": [
      +            "object",
      +            "string"
      +          ]
      +        }
      +      },
      +      "type": "object"
      +    },
      +    "next": {
      +      "description": "Cursor for the next page (pass as cursor), or null.",
      +      "type": [
      +        "string",
      +        "null"
      +      ]
      +    },
      +    "ok": {
      +      "description": "Always true on success.",
      +      "type": "boolean"
      +    },
      +    "op": {
      +      "description": "The operation that ran.",
      +      "type": "string"
      +    },
      +    "result": {
      +      "description": "What the operation returns.",
      +      "properties": {
      +        "headings": {
      +          "description": "This page of headings, in document order.",
      +          "items": {
      +            "additionalProperties": true,
      +            "description": "A heading (layout facts may add keys).",
      +            "properties": {
      +              "at": {
      +                "description": "Paragraph address, p<n>#<fingerprint> (story-prefixed in notes/headers).",
      +                "type": "string"
      +              },
      +              "blank_before": {
      +                "description": "Empty paragraphs right before it.",
      +                "type": "integer"
      +              },
      +              "centred": {
      +                "description": "Whether it is centred.",
      +                "type": "boolean"
      +              },
      +              "kind": {
      +                "description": "Header/footer kind: default, first or even.",
      +                "type": "string"
      +              },
      +              "level": {
      +                "description": "Heading level, 1-9.",
      +                "type": "integer"
      +              },
      +              "note": {
      +                "description": "A note's id, displayed number and the body paragraph holding its mark.",
      +                "properties": {
      +                  "id": {
      +                    "description": "Note id.",
      +                    "type": "integer"
      +                  },
      +                  "number": {
      +                    "description": "Displayed number.",
      +                    "type": "string"
      +                  },
      +                  "of": {
      +                    "description": "Address of the paragraph holding the mark.",
      +                    "type": "string"
      +                  }
      +                },
      +                "type": [
      +                  "object",
      +                  "null"
      +                ]
      +              },
      +              "page_break_before": {
      +                "description": "Whether it starts a page.",
      +                "type": "boolean"
      +              },
      +              "section": {
      +                "description": "Section (1-based) whose header or footer this is.",
      +                "type": "integer"
      +              },
      +              "story": {
      +                "description": "Story kind outside the body: footnote, endnote, header or footer.",
      +                "type": "string"
      +              },
      +              "style": {
      +                "description": "Paragraph style id.",
      +                "type": [
      +                  "string",
      +                  "null"
      +                ]
      +              },
      +              "style_name": {
      +                "description": "Paragraph style display name.",
      +                "type": [
      +                  "string",
      +                  "null"
      +                ]
      +              },
      +              "text": {
      +                "description": "Heading text, whitespace collapsed, clipped at 160 characters.",
      +                "type": "string"
      +              },
      +              "truncated": {
      +                "description": "True when text was clipped.",
      +                "type": "boolean"
      +              },
      +              "used_by_sections": {
      +                "description": "Sections that show this header or footer.",
      +                "items": {
      +                  "type": "integer"
      +                },
      +                "type": "array"
      +              }
      +            },
      +            "type": "object"
      +          },
      +          "type": "array"
      +        },
      +        "total": {
      +          "description": "Items in the whole list, across pages.",
      +          "type": "integer"
      +        }
      +      },
      +      "required": [
      +        "total",
      +        "headings"
      +      ],
      +      "type": "object"
      +    },
      +    "warnings": {
      +      "description": "Things to know about the result.",
      +      "items": {
      +        "type": "string"
      +      },
      +      "type": "array"
      +    }
      +  },
      +  "required": [
      +    "api",
      +    "ok",
      +    "op",
      +    "result",
      +    "warnings",
      +    "next"
      +  ],
      +  "type": "object"
      +}
  2. Addedv0.1.3

TDQS

A4.8/5.0
Behavior5/5

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

Goes well beyond the readOnly/idempotent annotations by disclosing paging mechanics (about 8,000 bytes per reply, limit up to 1,000, continue with `cursor` set to `next`). It also names what each item contains (address, level, style, text), giving concrete behavioral context.

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-loads the core purpose and is dense but mostly earns its words. It is a little packed with clauses, but no sentence is pure filler.

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 an output schema present, the description is not obligated to describe returns, and it still covers filtering, story selection, paging/continuation, and alternatives. An agent has everything needed to invoke it correctly.

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% (baseline 3), but the description adds real semantic value: "max_level 2 keeps levels 1-2" clarifies the parameter's effect and stories ["body","notes"] is shown with example values and behavior. It stops short of explaining the `headers` story option present in the schema.

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 ("List") and resource ("headings"), with scope (levels 1-9, by style or outline level, in document order) and the returned fields. It effectively distinguishes itself from siblings doc.segment, para.list, and para.get by name.

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 routes the agent to alternatives: doc.segment for chapters not styled as headings, para.list for every paragraph, para.get to read one heading in full. It names both the conditions and the sibling tools, leaving nothing to inference.

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