Skip to main content
Glama

Typebar (formerly SuperDocs)

export_document

Round-trips the document through the original docx renderer, preserving tables, borders, shading, alternating row colors, headers, footers, fonts, inline styling, and embedded images. Two modes: pass html directly to export ad-hoc content, OR pass session_id to export the session's current state. Format options: 'docx' (default, native Open XML, best for programmatic processing or mail merge), 'pdf', 'html', 'markdown', or 'txt' ('doc' is a legacy Word-compatible HTML alias). Fidelity is the differentiator vs naive HTML to docx converters. When called as an MCP tool, binary formats (docx/pdf/doc) are returned as a short-lived signed download_url in a JSON envelope (fetch it to get the file); text formats (html/markdown/txt) are returned inline.

Input Schema

NameRequiredDescriptionDefault
htmlNoHTML content to export inline. Used instead of the session document if provided.
formatNoExport format. One of docx (default), pdf, html, markdown, txt.docx
optionsNoCustomization (paper, margins, filename, watermark, etc.).
filenameNoDEPRECATED. Use options.filename. Top-level kept for legacy callers.
upload_idNoID returned by /v1/uploads (large-document upload flow, for payloads above ~25 MB). When set, the route fetches the HTML body from the uploaded payload instead of using the html field.
session_idNoSession ID to export from (the document is taken from the session). Required if html is omitted.
authorizationNo
source_filenameNoThe document's original/source filename (e.g. the name it was uploaded under). Used as the default export filename when no explicit options.filename is set, taking precedence over the first heading.

Schema Changelog

Changes observed during successful MCP inspections.

No schema history has been recorded yet.

TDQS

A4.3/5.0
Behavior4/5

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

With no annotations, the description carries the full burden and does so well: it discloses the MCP return contract (binary formats yield a short-lived signed download_url in a JSON envelope; text formats return inline), the strict vs compat fidelity semantics, and the default docx behavior. It omits permissions/auth requirements and any note on side effects or rate limits, so it is strong but not exhaustive.

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?

Dense and front-loaded: fidelity/preservation claim first, then modes, then formats, then the MCP return behavior. Every sentence carries information, though the fidelity marketing line and the format enumeration make it longer than strictly necessary.

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?

For a complex 8-parameter tool with nested options and no output schema, the description compensates by explaining the return envelope and format-dependent output. It stops short of covering the upload_id large-payload flow or error behavior, which the schema alone carries, leaving a small gap.

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 already 88%, so the schema documents most parameters. The description still adds value by explaining the mutual-exclusion relationship between html and session_id, clarifying that 'doc' is a legacy HTML alias (not stated in the enum description), and characterizing the docx default for downstream processing.

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 precise verb+resource (export a document) and goes further, naming the two input modes (html for ad-hoc content, session_id for session state) and the exact fidelity behaviors preserved (tables, borders, shading, headers, footers, images). It also positions itself against naive HTML-to-docx converters, so an agent can distinguish it from generic conversion utilities.

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?

Gives clear routing guidance for the two modes ('pass html directly... OR pass session_id') and per-format advice ('docx... best for programmatic processing or mail merge'). It does not name sibling alternatives such as request_download_url or get_document_detail, nor state when NOT to export, so it falls short of a 5.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.