Skip to main content
Glama

document_outline

Read-onlyIdempotent

Map a PDF, DOCX, Markdown, or TXT file's structure to decide what to read: unit counts, headings, tables, text-layer status, and unreadable units.

Instructions

The structural map of a PDF/DOCX/MD/TXT in a few hundred characters: unit kind and count (pages, lines or paragraphs), headings from the file's own markup or PDF bookmarks (never inferred), tables, per-page text-layer status, unreadable units. Use it to decide what to read. [docbridge schema 0.2.4]

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
encodingNoText encoding of a .md/.txt input. Omit for UTF-8; docbridge never guesses.
max_itemsNo
input_pathYesAbsolute file path.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
toolYes
errorNo
sourceNo
outlineNo
invariantNodocbridge may reduce the volume of its own responses, but it never alters, summarizes, paraphrases, semantically filters, or silently truncates source evidence
schema_versionYes
operation_completedYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.2.4

TDQS

A4.1/5.0
Behavior4/5

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

Annotations already establish read-only, idempotent, non-destructive, closed-world behavior, and the description adds real context beyond that: the output is a few hundred characters, headings are 'never inferred' (only from file markup or PDF bookmarks), and unreadable units and per-page text-layer status are surfaced. It does not mention failure modes for unsupported/corrupt files, but the annotation baseline is already covered.

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?

A single dense, front-loaded sentence describes the payload, followed by a one-line usage cue and a schema version tag. Every clause carries information, though the enumeration is long enough that a reader must parse carefully.

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?

An output schema exists, so return-value explanation is not required, yet the description still conveys the shape and size of the output plus its reliability caveats. The only material gap is the undocumented max_items parameter and what happens when the outline exceeds it.

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

Parameters3/5

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

Schema coverage is 67%: encoding and input_path are documented in the schema, but max_items has no description anywhere and the tool description never explains it (truncation behavior at the default 200 / max 10000). The description adds no parameter-level meaning beyond what the schema already supplies.

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 names a specific resource (structural map of a PDF/DOCX/MD/TXT) and enumerates exactly what it returns: unit kind/count, headings from native markup or PDF bookmarks, tables, per-page text-layer status, and unreadable units. The clause 'Use it to decide what to read' cleanly separates it from document_read and document_extract.

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?

It gives a clear selection context – run this reconnaissance step to decide what to read next – which implies the read/extract siblings are downstream actions. It stops short of naming an alternative or a when-not condition (e.g., when the file is already small enough to read whole).

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