Document Generation
Agents can create documents during conversations using the generate_document MCP tool. This enables agents to produce reports, presentations, spreadsheets, meeting notes, and more -- all formatted as downloadable files.
Supported Formats
| Format | Extension | Best For |
|---|---|---|
| PowerPoint | .pptx | Presentations, pitch decks, status updates |
| Word | .docx | Reports, proposals, meeting notes |
| Excel | .xlsx | Data exports, financial reports, dashboards |
| Formal documents | ||
| Markdown | .md | Technical docs, READMEs, specs |
| Plain Text | .txt | Logs, raw exports, simple notes |
How It Works
- A user asks an agent to create a document (e.g., "Create a Q4 sales report")
- The agent uses the
generate_documenttool with structured content - MeetLoyd generates the file and stores it as a persistent attachment
- The agent replies with a download link, rendered as an artifact card in chat
Example Flow
User: "Create a presentation about our Q4 results"
Agent uses generate_document with format, filename, title, and slide content.
Agent: "Here's your Q4 results presentation:" followed by an artifact card with the file name, format label, and a download button.
Artifact Cards
When an agent sends a message containing a file download URL, the chat renders it as a styled artifact card:
- Format-specific icon and color (red for PDF, blue for DOCX, green for XLSX, orange for PPTX)
- File name displayed prominently
- File format label and size
- One-click download
This works for both agent-generated documents and user-uploaded files.
Use Cases
| Use Case | Format | Example |
|---|---|---|
| Meeting notes | DOCX | Agent summarizes a team conversation into structured notes |
| Status presentations | PPTX | Weekly status deck auto-generated from project data |
| Data exports | XLSX | Agent pulls CRM data and creates a filtered spreadsheet |
| Compliance reports | Audit report generated from governance pack data | |
| Technical specs | MD | Agent drafts a spec based on conversation requirements |
| Executive summaries | DOCX | Agent distills a long thread into a one-page brief |
Persistence
Generated documents are stored durably, tied to the tenant and agent that created them. Files survive server restarts and deployments -- download links remain valid.
Best Practices
The more detail you give, the better the document. "Create a PPTX with 5 slides covering Q4 revenue, key wins, top customers, challenges, and 2026 outlook" produces much better results than "Make a presentation about Q4."
Include format guidance in agent system prompts so agents pick the right format automatically. PPTX for presentations, DOCX for reports, XLSX for data tables.
Upload raw data files and ask agents to transform them into formatted documents. The agent reads the input, processes it, and generates polished output.
Related: Files & Attachments for upload and file management details.