PDF Tools
Fill one PDF form template with an array of records and output one filled PDF per record (ZIP) or a merged PDF
Call this tool from your code in three languages.
# 1) Request a presigned URL → returns { uploadUrl, storageKey }
curl -X POST 'https://api.elysiatools.com/api/upload/presign/pdf-form-fill-batch' \
-H 'Content-Type: application/json' \
-d '{"filename":"templatePdf.ext","contentType":"application/octet-stream","size":12345}'
# 2) PUT the file bytes directly to the presigned uploadUrl
curl -X PUT '<presigned uploadUrl>' \
--data-binary @/path/to/file.ext
# 3) Call the tool, passing the returned storageKey for each file field
curl -X POST 'https://api.elysiatools.com/en/api/tools/pdf-form-fill-batch' \
-F 'templatePdf=/public/samples/pdf/certificate-template.pdf' \
-F 'recordsJson=[{"name":"Alice Zhang","course":"Advanced TypeScript","date":"2026-06-16"},{"name":"Bob Chen","course":"Go Fundamentals","date":"2026-06-16"},{"name":"Carol Lee","course":"Rust Systems","date":"2026-06-16"}]' \
-F 'outputMode=zip' \
-F 'nameField=name' \
-F 'flattenEach=true'Send a POST request with your inputs as JSON. File parameters require a separate upload first.
POST https://api.elysiatools.com/en/api/tools/pdf-form-fill-batch| Name | Type | Required | Description |
|---|---|---|---|
| templatePdf | fileupload required | Yes | — |
| recordsJson | textarea | Yes | JSON array of objects. Each object fills one copy of the template. |
| outputMode | select | No | — |
| nameField | text | No | Record field used to name each output PDF in ZIP mode |
| flattenEach | checkbox | No | Flatten each filled form so it is non-editable |
File result
{
"filePath": "/public/processing/randomid.ext",
"fileName": "output.ext",
"contentType": "application/octet-stream",
"size": 1024,
"metadata": {
"key": "value"
},
"error": "Error message (optional)",
"message": "Notification message (optional)"
}Add this tool to your Model Context Protocol server so AI agents can list and call it.
Add this block to your MCP client configuration:
{
"mcpServers": {
"elysiatools-pdf-form-fill-batch": {
"name": "pdf-form-fill-batch",
"description": "Fill one PDF form template with an array of records and output one filled PDF per record (ZIP) or a merged PDF",
"baseUrl": "https://api.elysiatools.com/mcp/sse?toolId=pdf-form-fill-batch",
"command": "",
"args": [],
"env": {},
"isActive": true,
"type": "sse"
}
}
}After connecting to the SSE endpoint, list the exposed tools:
{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/list"
}Invoke the tool by its id, passing arguments built from its parameters:
{
"jsonrpc": "2.0",
"id": 2,
"method": "tools/call",
"params": {
"name": "pdf-form-fill-batch",
"arguments": {
"templatePdf": "/public/samples/pdf/certificate-template.pdf",
"recordsJson": "[{\"name\":\"Alice Zhang\",\"course\":\"Advanced TypeScript\",\"date\":\"2026-06-16\"},{\"name\":\"Bob Chen\",\"course\":\"Go Fundamentals\",\"date\":\"2026-06-16\"},{\"name\":\"Carol Lee\",\"course\":\"Rust Systems\",\"date\":\"2026-06-16\"}]",
"outputMode": "zip",
"nameField": "name",
"flattenEach": true
}
}
}Questions or issues? Contact [email protected]