write_metadata sets, changes, or adds one metadata property and saves the updated file. Example prompt: “Set the author of report.pdf to the Research team and give it a proper title” — which is two calls, chained.
Tool description (as the AI agent sees it):
Sets, changes, or adds a single metadata property on a document and saves the updated file to storage. Call this whenever the user wants to write a property value — ‘set the author of report.pdf to ABC’, ‘add title “Q3 Report” to file.docx’, ‘change the subject’, ‘put my company name in the metadata’. property is one of Author, Title, Subject, Keywords, Comments, Copyright, Company, Manager; value is the text to write; mode is ‘set’ (replace, default) or ‘add’ (append, for list fields like Keywords). The tool maps the friendly name to the correct field per format automatically (PDF Info/XMP, Office document properties, EXIF/IPTC for images) and creates the field if it is absent. Supports PDF, DOCX, XLSX, PPTX, JPEG, PNG, TIFF and 100+ more formats. Returns a saved-path message plus how many fields changed; if the property does not apply to the file’s format it reports 0 changed. On failure the response text starts with ‘Metadata write failed for’.
One property per call. When several need changing, the agent must pass the result of each call into the next, or earlier edits are lost — each call starts from the file it was given.
On failure the text starts with Metadata write failed for, followed by the exception type and message. A property a format does not support fails here rather than silently doing nothing.
Example prompts
“Set the author of report.pdf to the Research team.”
“Give this document the title ‘Q3 Report’.”
“Add a custom property Reviewer with my name.”
Was this page helpful?
Any additional feedback you'd like to share with us?
Please tell us how we can improve this page.
Thank you for your feedback!
We value your opinion. Your feedback will help us improve our documentation.