Reports and documents from AI assistants
Turn Markdown, HTML, tables, images, and chart data into an EPUB through your connected assistant.
Ask your connected AI assistant to turn a report or your own writing into an EPUB. Relay accepts Markdown, plain text, and HTML through MCP. You can save the EPUB to your library, send it to a registered device, or include the document in an existing reading list. Document import is currently available through MCP; there is no file-upload form in Relay yet.
Try a report
Using the store figures I supplied, prepare a Markdown report with a revenue comparison chart, an exact-value table, and a short explanation. Import it into eReader Relay and create an EPUB in my library. Keep missing figures marked as missing; do not estimate them.
The assistant should call get_document_capabilities first to check supported formats and limits.
It submits the text and any chart data using import_document, then uses the returned document ID:
| What you want | Tool |
|---|---|
| Create an EPUB in your library | generate_document_epub |
| Generate and email an EPUB to a registered device | send_document_to_device |
| Include the report in a reading list | add_document_to_reading_list |
| Find previously imported reports | list_documents |
| Remove an imported report | delete_document |
Ask the assistant to check get_delivery_status after generation or sending. ready means the EPUB
is available to download, sent means the email provider accepted it, and failed indicates a
delivery failure. Relay cannot confirm receipt on a physical device. Hosted previews disable email,
so their result is ready even when you test the send tool. The status response explicitly reports
delivery.emailEnabled: false and explains that preview email is disabled. Repeated polling will
not send it, and this status does not indicate a problem with your Kindle settings. To test email,
connect to the production MCP and import/send the report there; preview documents do not transfer.
An imported document and an EPUB are separate items. Importing saves the document; generating creates an EPUB. Adding a document to a reading list includes it once, in a future edition. Each edition takes up to five pending documents; additional documents wait for later editions. The reading-list detail page shows whether each report is waiting or has been included. Adding the same document to the same list again does not schedule another copy.
Charts without image files
An assistant can supply numbers for bar and line charts. Relay renders these into PNG images and packages them inside the EPUB, so the book works offline. No external chart service or image URL is required. Charts appear after the document text, in the order supplied.
Charts use grayscale shading and line styles suitable for eReaders. Every chart is followed by an HTML table containing the full labels and exact values. Long labels may be shortened in the image; the table retains them. The bundled image font supports Latin, Greek, and Cyrillic text; use short Latin labels for charts with other scripts and put the full names in the document table.
The assistant must use the data you supply. Relay validates the structure and numeric bounds;
it does not verify the accuracy of business figures or conclusions. null means Not available,
which is distinct from zero. A line has a gap where data is missing.
Here is a complete example of arguments for import_document, using illustrative figures:
{
"requestId": "f59567bc-af8f-4fcb-8728-3d9c77b1da72",
"title": "Weekly store performance",
"format": "markdown",
"content": "# Weekly review\n\nSydney revenue rose from AUD 12,450 to AUD 13,900.\n\n| Store | Previous week | This week |\n| --- | ---: | ---: |\n| Sydney | 12450 | 13900 |\n| Melbourne | 10200 | 11850 |\n| Brisbane | 8600 | 9150 |",
"charts": [
{
"id": "revenue",
"type": "bar",
"title": "Weekly revenue by store",
"yAxisLabel": "AUD",
"labels": ["Sydney", "Melbourne", "Brisbane"],
"series": [
{ "name": "Previous week", "values": [12450, 10200, 8600] },
{ "name": "This week", "values": [13900, 11850, 9150] }
]
}
]
}Use a new UUID for each new import or generation. For a retry, reuse the same UUID and arguments to avoid duplicate documents, books, or sends. Changing the content requires a new import.
Supplied images and other graphs
If your assistant can read an actual image file, it can submit its bytes as base64. Reference the
attachment in Markdown with  and include this image entry:
{
"id": "store-photo",
"mediaType": "image/png",
"base64": "BASE64_OF_THE_ACTUAL_IMAGE_FILE"
}The placeholder above must be replaced with real bytes; inventing a base64 string will not work.
HTML can use an img element with the same attachment reference. Embedded PNG, JPEG, and WebP
data URLs are also accepted, but their text counts toward the document text limit.
Relay decodes and re-encodes supplied images, checks their dimensions and size, and includes them inside the EPUB. Images are static. Remote image URLs are rejected, so your report cannot trigger background fetches to private networks or tracking services. An assistant that cannot access image bytes can use the built-in chart data format or submit a table instead.
For other graph types, supply a finished PNG, JPEG, or WebP generated by your own trusted tool. Relay does not execute Mermaid, MDX components, JavaScript, custom chart code, or supplied SVG. PDF, DOCX, spreadsheets, and archives are not accepted as document uploads in this version; an assistant can extract their content into a supported format before importing it.
Tables and reading on small screens
Markdown tables and HTML tables preserve their rows, headers, captions, and bounded merged cells. Relay removes custom styling and unsafe attributes. Tables with more than four columns also get a row-by-row text version after the table, so values remain readable on a narrow display. That alternative is generated for tables up to 200 rows and 24 columns; split larger tables into smaller sections. Nested tables and layouts whose merged cells would produce an excessively large alternative keep their table structure without the text alternative.
The same table improvements apply to newly generated books from articles and newsletters. Existing EPUB downloads are unchanged; generate a new edition to use the improved formatting.
Limits, privacy, and deletion
| Input | Limit |
|---|---|
| Document text | 64 KiB of UTF-8 |
| Supplied images | 8, at most 256 KiB each and 512 KiB combined |
| Image dimensions | 4096 pixels per side and 16 megapixels; resized to fit 1600 × 1600 |
| Charts | 4 per document; bar or line |
| Chart data | 12 categories and 4 series per chart; one finite number or null per category |
| Numeric range | −1 trillion to +1 trillion |
| Prepared document including media | 1.5 MB |
| Complete MCP request | 2 MiB; your assistant may impose a smaller limit |
Imported documents share your plan's source allowance with saved feeds and articles. Generating or sending a document also uses the normal manual-generation and EPUB-library allowances. Tools operate only on the Relay account you authorized, including its own reading lists and devices.
Deleting an imported document removes its saved body and images and frees its source slot. It does not remove EPUBs already generated or recall an email. Delete those EPUBs separately from your library. A report being generated cannot be deleted until its run finishes. Relay retains the request ID and content fingerprint after deletion so a retry cannot silently restore the report.