/** * Tool: add_attachment * * Generates a PDF/A-3 document with one or more embedded files * (ISO 19005-3 ยง6.8). Primary use case: Factur-X / ZUGFeRD electronic * invoices, where a structured XML payload is attached to a human-readable * PDF invoice with `relationship: 'Source'`. * * Implementation: * - Delegates to pdfnative's `buildDocumentPDFBytes` with the `attachments` * option and `tagged: 'pdfa3b'`. pdfnative validates that attachments are * only allowed under PDF/A-3. * - PDF/A-3 is enforced (pdfnative throws otherwise); the input schema * does not expose the pdfA flag for that reason. * * Limitations: * - Only document generation (not "add attachment to existing PDF"). The * latter requires page-tree manipulation primitives not exported by * pdfnative v1.2 and is tracked for v1.1 of pdfnative-mcp. */ import { type PdfAttachmentRelationship } from 'pdfnative'; import { type OutputResult } from '../output.js'; export declare const ADD_ATTACHMENT_NAME = "add_attachment"; export declare const ADD_ATTACHMENT_INPUT_SCHEMA: { readonly type: "object"; readonly additionalProperties: false; readonly required: readonly ["title", "attachments"]; readonly properties: { readonly title: { readonly type: "string"; readonly minLength: 1; readonly maxLength: 200; readonly description: "Document title (also written to the /Info dictionary)."; }; readonly blocks: { readonly type: "array"; readonly description: "Optional human-readable document body (same block schema as generate_basic_pdf). When omitted, a minimal cover paragraph is emitted so the PDF is not empty."; readonly maxItems: 200; readonly items: { readonly type: "object"; }; }; readonly footerText: { readonly type: "string"; readonly maxLength: 200; readonly description: "Optional footer text rendered on every page."; }; readonly attachments: { readonly type: "array"; readonly description: "One or more files to embed. Auto-enables PDF/A-3 (ISO 19005-3). Factur-X invoices use a single attachment with relationship=Source and mimeType=application/xml."; readonly minItems: 1; readonly maxItems: 20; readonly items: { readonly type: "object"; readonly additionalProperties: false; readonly required: readonly ["filename", "mimeType", "dataBase64"]; readonly properties: { readonly filename: { readonly type: "string"; readonly minLength: 1; readonly maxLength: 255; }; readonly mimeType: { readonly type: "string"; readonly minLength: 1; readonly maxLength: 200; }; readonly dataBase64: { readonly type: "string"; readonly minLength: 1; }; readonly relationship: { readonly type: "string"; readonly enum: readonly PdfAttachmentRelationship[]; }; readonly description: { readonly type: "string"; readonly maxLength: 500; }; }; }; }; readonly outputMode: { readonly type: "string"; readonly enum: readonly ["base64", "file"]; readonly default: "base64"; }; readonly outputPath: { readonly type: "string"; }; }; }; export declare function addAttachment(rawInput: unknown): Promise; //# sourceMappingURL=add-attachment.d.ts.map