Skip to main content
Glama

export_document

Export legal drafts to DOCX, UDF, PDF, plain text, or bundles, and convert DOCX/UDF files for petition and bundle preparation.

Instructions

Unified document export: DOCX, UDF, PDF, plain text, or bundle.

Args: format: 'docx' (default), 'udf', 'pdf', 'plain', 'bundle', or 'capabilities' (returns supported formats). draft_path: Path to draft.md (for docx/plain). draft_json: Draft metadata dict (for docx). text: Text to write (for udf; plain text — petition formatting such as bold title/labels/headings is applied automatically). out_path: Output file path (for docx/udf/plain). out_dir: Output directory (for bundle). pack_dir: Pack directory (for bundle). draft_dir: Draft output directory (for bundle). docx_path: Path to a .docx (for bundle; for udf this is the PREFERRED input — converts DOCX directly to UDF preserving bold, alignment, indent and line spacing). udf_path: Path to a .udf — converts it to docx or pdf via LibreOffice (replaces convert_udf_to_docx/pdf). title_centered: Center the title in UDF output. title: Document title (for legacy export_bundle). body: Document body (for legacy export_bundle). documents: List of document dicts (for legacy export_bundle).

Input Schema

NameRequiredDescriptionDefault
bodyNo
textNo
titleNo
formatNodocx
out_dirNo
out_pathNo
pack_dirNo
udf_pathNo
documentsNo
docx_pathNo
draft_dirNo
draft_jsonNo
draft_pathNo
title_centeredNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv2.0.0

TDQS

A4/5.0
Behavior3/5

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

No annotations are supplied, so the description carries the full burden. It usefully discloses non-obvious behavior – plain-text petition formatting applied automatically, docx_path being the PREFERRED udf input, LibreOffice-based conversion preserving bold/alignment/indent/spacing – but says nothing about overwrite semantics for out_path, error behavior, or required runtime dependencies.

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?

One-line summary front-loads purpose, followed by a per-parameter list that earns its length for a 14-param tool. Dense but readable; no filler sentences.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a 14-parameter, multi-mode tool with no annotations, no output schema, and no required-param declaration, the description omits two things an agent needs: which parameters are actually required for each format mode, and what the tool returns (a path? a structure?) besides the 'capabilities' hint.

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 0% and there are 14 parameters, so the description is doing all the work: nearly every parameter is annotated with the format it applies to and its role. A few units remain thin (draft_json as an opaque 'metadata dict', title/body/documents tagged only 'legacy export_bundle'), but compensation is strong overall.

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 opening line states a specific verb+resource ('Unified document export') and enumerates the five formats plus a capabilities mode, so the agent can distinguish it immediately from the search/get siblings.

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 routes the caller per format by tying each parameter to the format it serves (draft_path for docx/plain, out_dir for bundle, etc.) and explicitly notes udf_path 'replaces convert_udf_to_docx/pdf'. It stops short of stating when NOT to use this tool or which parameter combinations are mandatory per format.

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