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
| Name | Required | Description | Default |
|---|---|---|---|
| body | No | ||
| text | No | ||
| title | No | ||
| format | No | docx | |
| out_dir | No | ||
| out_path | No | ||
| pack_dir | No | ||
| udf_path | No | ||
| documents | No | ||
| docx_path | No | ||
| draft_dir | No | ||
| draft_json | No | ||
| draft_path | No | ||
| title_centered | No |