Skip to main content
Glama
pdf4me
by pdf4me

generate_documents_multiple

Generate multiple documents from a single template and JSON/XML data, outputting each as PDF, Word, Excel, or HTML. Automatically saves files to your directory.

Instructions

Generate multiple documents from one template and data using PDF4me GenerateDocumentMultiple API (POST /api/v2/GenerateDocumentMultiple). Supports async polling on 202; saves each output from outputDocuments[].streamFile.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
output_dirYesDirectory where generated files are written.
output_typeYesDesired output format (PDF, Docx, Html, Excel, Word).
file_meta_dataNoOptional fileMetaData string.
meta_data_jsonNoOptional metaDataJson string.
output_file_nameYesBase output file name; multiple files use name_1.ext, name_2.ext, etc.
document_data_typeYesJson or XML.
template_file_nameYesFile name for the template in the request.
template_file_pathYesLocal path to the template file.
template_file_typeYesTemplate kind sent to the API (e.g. Docx, Html, Pdf, Word).
document_data_file_pathNoLocal file read as base64 for documentDataFile.
document_data_text_pathNoPath to a UTF-8 file whose contents are sent as documentDataText.
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description carries the burden and adds value by disclosing the underlying API endpoint, support for async polling on 202, and how outputs are saved from outputDocuments[].streamFile. This reveals non-obvious behavior beyond the name, though it does not cover all possible side effects or error handling.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is two sentences with no wasted words, front-loading the purpose and then providing essential technical details about the API and async behavior. It is appropriately concise and structured.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's complexity (11 parameters, async API, no output schema), the description covers the API endpoint, async polling, and output saving mechanism, which is valuable context beyond the schema. It does not explicitly address return values, but the lack of an output schema makes that less critical. Slightly more detail on data input options would be helpful, but overall it is sufficiently complete.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the baseline is 3. The description does not add specific parameter semantics beyond the schema, only broadly mentioning 'template and data'. Thus it neither enhances nor detracts from the schema's already complete parameter descriptions.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description states exactly what the tool does: 'Generate multiple documents from one template and data using PDF4me GenerateDocumentMultiple API'. This is a specific verb+resource statement that distinguishes it from siblings like generate_document_single by specifying 'multiple documents'.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides clear context by indicating this tool is for generating multiple documents from a template, which implicitly differentiates it from generate_document_single. However, it does not explicitly name alternatives or state when not to use it, so it stops short of a score of 5.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/pdf4me/pdf4me-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server