Skip to main content
Glama

write_document

Write content to document files in HTML, Markdown, plain text, or DOCX formats. Automatically saves files with intelligent format detection and organized naming.

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

TableJSON Schema
NameRequiredDescriptionDefault
contentYesContent to write
encodingNoFile encodingutf-8
titleNoDocument title (optional, used for filename generation)
formatNoForce specific format: html, md, txt, docx (optional, auto-detected if not specified)

Implementation Reference

  • Helper mapping in ConversionPlanner that associates converting from TXT format to HTML, Markdown, MD, DOCX, or PDF with the 'write_document' tool name. This is the only reference to the tool in the codebase, suggesting it may be planned or external.
    txt: { html: 'write_document', markdown: 'write_document', md: 'write_document', docx: 'write_document', pdf: 'write_document', },

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/Tele-AI/doc-ops-mcp'

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