A hundred personalised PDFs from one prompt: mail merge with an AI agent
Mail merge is the oldest automation in the office and still the one people do by hand. With an MCP tool that fans a template out over a JSON array, an agent writes one file per customer, names each one by a field, and lists the records that failed instead of stopping.
Edit a PDF with an AI agent? Turn it into Word first, locally
‘Edit this PDF’ is one of the most common things people ask an AI agent, and a PDF is the least editable format there is. The honest answer is a conversion: the agent turns the PDF into an editable Word document locally, then makes the change there.
Edit one worksheet, keep the workbook: surgical edits with an HTML round-trip
An agent asked to change two numbers on one sheet should not rebuild the workbook. Extract that sheet as HTML, let the agent edit it, and save it back into a copy of the original: the other sheets never pass through the model.
Fill Word forms from a spreadsheet with an AI agent, locally
HR has a Word onboarding form and a spreadsheet of new hires. An agent that first asks the form for its field names, then fills one copy per row, produces correct forms and tells you which values had nowhere to go.
Let the model fill in the data, not write the document
An agent asked to write a contract invents the layout, the clauses and sometimes the numbers. Give it a template instead: it asks the template which fields it needs, fills a JSON skeleton from your notes, and the engine renders the document.
Rename a party across 40 contracts without touching the formatting
A supplier changes its name and forty documents need the new one. An agent with a find-and-replace tool walks the folder, writes an edited copy of each file, reports a count per file, and skips the files that do not mention the old name.
The chart comes from the template, the numbers come from the data
Asking a model to draw a table or a chart from a CSV invites invented rows and rounded numbers. Put the table and the chart in a template, hand the data file to the engine, and the agent only decides which template and which file.
What does this template need? Ask it.
Most template failures are a missing field, a block that is never closed or the wrong placeholder syntax. An agent that reads the template first, and gets errors it can act on, fixes them in one round instead of five.
Why an AI agent should not rewrite your document to change three words
Asking a model to retype a contract to rename one party loses styles, tables and the reviewer’s trust. A targeted edit changes only the words you named, reports how many, and writes nothing when nothing matched.
Your repo already has the data; let the agent make the PDF
Release notes for the customer, a compliance report, certificates for contributors: the data is already in the repository as JSON, and the formatting is the part nobody wants to do. A template next to the data and an MCP tool give a coding agent the last step.