sign applies a signature to a document and saves the signed file. Four types: text, qrcode, barcode (visual marks), and digital (certificate-backed, the one with legal weight). Example prompt: “Sign contract.pdf with a QR code holding the order reference”.
Tool description (as the AI agent sees it):
Signs a document with a text, QR code, barcode, or digital certificate signature and saves the signed file to storage. Supports PDF, DOCX, XLSX, PPTX, and 30+ more document formats. Call this tool immediately whenever the user asks to sign a document, add a signature, or apply a digital signature. Do NOT pre-check whether files exist — just pass the filenames the user provided. The tool resolves files from storage and returns an error with available files if a name is not found. Returns a saved-path message (‘Signed with signature’) and the download URL or storage path. On failure, the response text starts with ‘Signing failed for’ followed by the underlying exception type, message, and inner-exception chain.
A saved-path message naming the signed document in your output folder. The original is left as it was.
For type: "digital", pass certificate (the certificate file, in the same FileInput shape as the document) and certificatePassword. Both are read locally; neither is transmitted anywhere.
A note on ordering: visual signatures change the file’s bytes, so applying one after a digital signature invalidates that digital signature. Sign digitally last.
On failure the text starts with Signing failed for, followed by the exception type and message — a wrong certificate password surfaces here.
Example prompts
“Sign contract.pdf with a QR code containing our order reference.”
“Add a text signature with my name and today’s date.”
“Sign this with the certificate in signing-cert.pfx.”
“Put a barcode with the invoice number on the invoice.”