Skip to main content
Glama
ExaDev

document-mcp

by ExaDev

Outline document

outline_document

Turn any document's content into a structured outline. Provide a file path or inline bytes, and get a tree of headings, list items, slides, sheets, or pages with their nested children.

Instructions

Projects a document's table of contents as a structured outline: reads the source through documents.js's DocumentConverter port, takes the tree-form DocumentPackage the conversion reports, and runs document-outline.js's buildOutline over it. Groups carry { text, level, children } (a heading's, list item's, slide's, sheet's, or page's own label plus nested children); leaves carry { kind, text }. The outline is over the source's own content -- the internal conversion target preserves it and is pdf only for odf (the one format that only converts to pdf) and odg (whose alternative, svg, cannot represent more than one page).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
sourceYesThe document to outline.
Behavior4/5

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

With no annotations provided, the description must disclose behavioral traits. It explains that the outline is over the source's own content, specifies the internal conversion target and its format limitations (pdf only for odf and odg), and details the return structure (groups and leaves). It does not mention performance or side effects, but the read-only nature is implied by 'projects' and 'reads the source,' which is sufficient.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, dense paragraph that packs a lot of information, but it is quite long and includes implementation details (documents.js's DocumentConverter port, document-outline.js's buildOutline) that may be irrelevant to an agent. It is front-loaded with the main purpose, but the latter half becomes overly technical. It could be trimmed to improve conciseness while retaining key behavioral details.

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?

Given the tool has 1 parameter, no output schema, and no annotations, the description covers the essential aspects: what it does, how it processes the source, the output structure, and format-specific limitations. It does not explicitly list return values, but the structure is described. The description is sufficient for an agent to use the tool 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?

The input schema covers the single parameter 'source' with 100% description coverage, detailing path or bytesBase64/format. The description adds semantic context by explaining that the document format is inferred from file extension or must be specified for inline bytes, and it clarifies the internal conversion target. Since schema coverage is high, the baseline is 3, but the description provides additional context about source handling and format nuances, earning a 4.

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 clearly states the tool's purpose: 'Projects a document's table of contents as a structured outline.' It identifies the specific source (a document), the action (outlining), and the output structure (groups with text, level, children; leaves with kind, text). This distinguishes it from siblings like convert_document and pdf_inspect, which serve different purposes.

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?

The description implies when to use this tool (when you need a structured table of contents or outline of a document). It also clarifies the internal conversion target: 'pdf only for odf (the one format that only converts to pdf) and odg (whose alternative, svg, cannot represent more than one page).' However, it does not explicitly say when NOT to use it or mention alternatives like pdf_inspect or convert_document.

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/ExaDev/document-mcp'

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