write_document
Generate and save document files automatically in HTML, Markdown, plain text, or DOCX formats. Specify content, encoding, and optional title; files are saved to OUTPUT_DIR with intelligent format detection.
Instructions
Write content to document files in specified formats. Output directory is controlled by OUTPUT_DIR environment variable. Files will be automatically saved to OUTPUT_DIR with auto-generated names based on content type (HTML, Markdown, or plain text). Supports intelligent format detection.
Input Schema
Name | Required | Description | Default |
---|---|---|---|
content | Yes | Content to write | |
encoding | No | File encoding | utf-8 |
format | No | Force specific format: html, md, txt, docx (optional, auto-detected if not specified) | |
title | No | Document title (optional, used for filename generation) |