Skip to content

Tools Reference

All 26 tools are available on both STDIO and HTTP transports. Every tool returns a JSON response with a success boolean and either the result data or an error message.

Tool Purpose
onlyoffice_generate_document Generate a document from a template
onlyoffice_batch_generate Generate multiple documents in parallel
onlyoffice_list_templates List available templates with metadata
onlyoffice_validate_data Validate data against a template schema
onlyoffice_modify_document Modify a document via data regeneration
onlyoffice_get_template_schema Get the JSON Schema for a template
onlyoffice_get_metadata Extract metadata from a document
onlyoffice_set_metadata Modify metadata in a document
onlyoffice_merge_documents Merge multiple PDF documents into one
onlyoffice_split_document Split a PDF into multiple parts

See also: Templates Reference, Metadata Tools


Generate a document (DOCX, PPTX, XLSX, PDF) from a template with provided data.

Parameter Type Required Description
template string Yes Template identifier (e.g., "stellenbeschreibung")
format enum Yes "docx", "pdf", "pptx", "xlsx"
data object Yes Template-specific data object
outputFilename string No Custom filename (default: auto-generated)
version string No Template version (default: latest)
deliveryMethod enum No "url" or "base64" (default depends on transport)
instanceId string No OnlyOffice instance ID (multi-tenant)
{
"template": "stellenbeschreibung",
"format": "docx",
"data": {
"Positionstitel": "Software Engineer",
"Fachbereich": "IT",
"Abteilung": "Development",
"Standort": "generic",
"Datum": "06.01.2026",
"Arbeitsverhaeltnis": "Vollzeit",
"Stellenziel": "Develop and maintain software applications",
"Hauptaufgaben": ["Code development", "Code review"],
"Nebenaufgaben": ["Documentation"]
}
}
{
"success": true,
"template": "stellenbeschreibung",
"format": "docx",
"artifact": {
"data": "UEsDBBQAAAAIAA...",
"size": 45678,
"mimeType": "application/vnd.openxmlformats-officedocument.wordprocessingml.document",
"filename": "stellenbeschreibung.docx",
"truncated": false
}
}

Files exceeding 10 MB are not base64-encoded. Check the truncated field.

Template DOCX PDF PPTX XLSX
stellenbeschreibung Yes Yes
dienstliches_schreiben Yes Yes
beschlussvorlage Yes Yes
praesentation Yes Yes
bericht Yes Yes

List available templates with metadata, categories, and tags.

Parameter Type Required Description
category string No Filter by category (e.g., "hr")
tags string[] No Filter by tags (e.g., ["german", "formal"])
{ "category": "hr" }
{
"templates": [
{
"id": "stellenbeschreibung",
"name": "Stellenbeschreibung",
"category": "hr",
"defaultVersion": "1.0",
"tags": ["hr", "job-description", "german", "formal"]
}
],
"count": 1
}
Category Description
hr Human Resources documents
correspondence Letters and official correspondence
government Municipal and government documents
presentations PPTX presentation templates
spreadsheets XLSX report templates

Validate data against a template schema before generation.

Parameter Type Required Description
template string Yes Template identifier
data object Yes Data to validate
version string No Template version
includeSchema boolean No Include full JSON Schema in response
{
"template": "stellenbeschreibung",
"data": { "Positionstitel": "Software Engineer" },
"includeSchema": true
}
{
"valid": true,
"errors": [],
"template": "stellenbeschreibung",
"version": "1.0",
"required": ["Positionstitel", "Fachbereich", "..."],
"optional": ["Anforderungsprofil", "..."]
}
{
"valid": false,
"errors": [
{ "field": "Fachbereich", "message": "Required field is missing", "code": "REQUIRED" },
{ "field": "Abteilung", "message": "Required field is missing", "code": "REQUIRED" }
]
}

Get the full JSON Schema for a template (types, formats, enums, required vs optional).

Parameter Type Required Description
id string Yes Template identifier
version string No Template version (default: latest)
{
"id": "stellenbeschreibung",
"name": "Stellenbeschreibung",
"version": "1.0",
"defaultVersion": "1.0",
"outputFormat": "docx",
"supportedFormats": ["docx", "pdf"],
"schema": {
"$schema": "http://json-schema.org/draft-07/schema#",
"type": "object",
"properties": { "...": "..." },
"required": ["Positionstitel", "Fachbereich", "..."]
}
}

Generate multiple documents in parallel.

Parameter Type Required Description
requests array Yes Array of generation requests (1-50)
concurrency number No Max parallel generations (1-10, default: 3)
stopOnError boolean No Stop on first error (default: false)

Each request supports: template, format, data, outputFilename, version.

Returns an array of results (same format as generate_document for each).


Modify an existing document by merging new data into the original and regenerating.

Parameter Type Required Description
template string Yes Template identifier
originalData object Yes Original data used to create the document
modifications object Yes Changes to apply (deep-merged)
format enum Yes Output format: "docx", "pdf", "pptx", "xlsx"
outputFilename string No Custom filename
version string No Template version (default: latest)
deliveryMethod enum No "url" or "base64" (transport-dependent)
instanceId string No OnlyOffice instance ID (multi-tenant)

Add a text or image watermark to a PDF or DOCX document.

Parameter Type Required Description
content string Yes Base64-encoded document
format enum Yes "pdf" or "docx"
text string No Watermark text
imageData string No Base64 image (PDF only)
position enum No "diagonal", "center", "top-left", etc.
opacity number No 0.0 to 1.0 (default: 0.3)

Extract text, tables, and images from a PDF or DOCX document in one call.

Parameter Type Required Description
content string Yes Base64-encoded document content
format enum Yes "pdf" or "docx"
extractionType enum No "text", "tables", "images", or "all" (default: "all")
{
"success": true,
"text": "Full text content...",
"tables": [{ "headers": ["..."], "rows": [["..."]] }],
"images": [{ "data": "base64...", "mimeType": "image/png" }],
"metadata": { "pageCount": 5, "wordCount": 1234 }
}

onlyoffice_extract_text, onlyoffice_extract_tables, and onlyoffice_extract_images are single-purpose variants that accept the same content + format parameters but return only the requested type.


Merge multiple PDF documents into one. Accepts an array of PDF sources (base64, path, or URL).

Split a PDF by page ranges or into equal parts.


Code Description
TEMPLATE_ERROR Template not found, version not available, or registry error
VALIDATION_ERROR Data failed schema validation
EXECUTION_FAILED DocBuilder script execution failed
CONTAINER_NOT_RUNNING Docker container not running or unreachable
TIMEOUT Execution exceeded timeout limit