autoform-mcp-server 1.7.3 → 1.7.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -13,7 +13,7 @@ import { handleGenerateBatch, generateBatchSchema } from './tools/generateBatch.
13
13
  import { handleListTemplates, listTemplatesSchema } from './tools/manageTemplates.js';
14
14
  import { handleImportTemplate, importTemplateSchema } from './tools/importTemplate.js';
15
15
  import { withMetrics } from './services/metricsLogger.js';
16
- const server = new Server({ name: 'autoform', version: '1.7.2' }, { capabilities: { tools: {} } });
16
+ const server = new Server({ name: 'autoform', version: '1.7.4' }, { capabilities: { tools: {} } });
17
17
  // Register all tools
18
18
  server.setRequestHandler(ListToolsRequestSchema, async () => ({
19
19
  tools: [
@@ -18,9 +18,11 @@ DIRECTORIO DE SALIDA: Si no se especifica output_dir, guarda en el mismo directo
18
18
 
19
19
  NO GENERES PDF DE PRUEBA: Genera el batch completo directamente.
20
20
 
21
- Modos de distribucion:
22
- - "sequential": campos repetidos consumen filas diferentes (para tablas/listas)
23
- - "repeat": una fila se repite en todos los campos con el mismo nombre (para certificados)`,
21
+ Modos de distribucion (DEFAULT: "repeat"):
22
+ - "repeat" (DEFAULT, recomendado para la mayoria de formularios): cada fila de datos genera UN documento completo. Todos los campos del template reciben sus valores de ESA fila. Usa este modo siempre que cada campo del template tenga un nombre UNICO (formularios normales, certificados, constancias).
23
+ - "sequential": SOLO usar cuando el template tiene campos REPETIDOS con el mismo nombre (ej: una tabla con 10 campos "nombre" donde cada uno debe llenarse con una fila diferente). Si no estas seguro, usa "repeat".
24
+
25
+ REGLA SIMPLE: si cada campo del template aparece solo 1 vez → "repeat". Si hay campos repetidos con el mismo fieldName → "sequential".`,
24
26
  inputSchema: {
25
27
  type: 'object',
26
28
  properties: {
@@ -39,7 +41,7 @@ Modos de distribucion:
39
41
  distribution_mode: {
40
42
  type: 'string',
41
43
  enum: ['sequential', 'repeat'],
42
- description: 'Modo de distribucion: "sequential" o "repeat". Default: sequential.'
44
+ description: 'Modo de distribucion. Default: "repeat" (cada fila = 1 documento). Usar "sequential" SOLO si el template tiene campos repetidos con el mismo nombre.'
43
45
  },
44
46
  merge_into_single: {
45
47
  type: 'boolean',
@@ -63,7 +65,7 @@ Modos de distribucion:
63
65
  }
64
66
  };
65
67
  export async function handleGenerateBatch(args) {
66
- const { template_name, distribution_mode = 'sequential', merge_into_single = false, output_dir } = args;
68
+ const { template_name, distribution_mode = 'repeat', merge_into_single = false, output_dir } = args;
67
69
  // data puede llegar como string JSON o como array
68
70
  let data = args.data;
69
71
  if (typeof data === 'string') {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "autoform-mcp-server",
3
- "version": "1.7.3",
3
+ "version": "1.7.4",
4
4
  "description": "MCP server for bulk PDF form filling. Detect fields, fill templates, and generate hundreds of PDFs from data — directly from Claude.",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",