26.7.1
26.7.1 — SearchMetadata + WriteMetadata tools, selective RemoveMetadata
Follow-up to 26.7.0 (engine bump + GetDocumentInfo + descriptive errors). Grows the tool
surface from 3 to 5 and turns the server into a full read/write/search/remove facade over
the GroupDocs.Metadata SDK.
What changed
New tool: search_metadata
- Returns only the properties matching a
category/nameContains/valueContainsfilter —
a thin predicate layer over the engine'sFindProperties. Answers targeted questions like
"show me the author" or "does this have GPS?" without dumping the whole property set. - Read-only (no
Save), so it works in evaluation mode. - Returns
{ count, properties: [{ name, value, category }] }. On failure the text starts with
Metadata search failed for '<file>': ….
New tool: write_metadata
- Sets, changes, or adds a property (Author, Title, Subject, Keywords, Comments, Copyright,
Company, Manager) and saves the updated file.mode=set(default) oradd. - Uses the GroupDocs.Metadata Tags taxonomy (
SetProperties/AddPropertieswith a
Tags.*predicate) so one friendly field name maps to the correct per-format field
automatically (PDF Info/XMP, Office document properties, EXIF/IPTC for images) and is created
when absent. Requires a license (likeremove_metadata). Failure prefix:
Metadata write failed for '<file>': ….
Extended: remove_metadata gains selective removal
- New optional
categoriesargument:gps,author,comments,company,dates,
software,copyright,keywords,personal— removed viaRemovePropertiesby tag. - Omitting
categories(or passingall) preserves the previous full-wipe (Sanitize)
behavior. Fully backward compatible — no change for existing callers.
Shared internals
Tools/MetadataCategories.cs— one category→tag-predicate map, used by bothsearch_metadata
and selectiveremove_metadata(single source of truth for the taxonomy).Tools/ToolError.cs— the descriptive-error formatter, previously duplicated per tool, now
extracted and used by all five tools.- Note: GroupDocs.Metadata ships its own
GroupDocs.Metadata.Common.Func<T,TResult>delegate
(Java-port artifact) thatFindProperties/SetProperties/RemovePropertiesconsume — the
helpers alias it (MetadataPredicate) to disambiguate fromSystem.Func.
Migration / impact
- Drop-in. No changes to existing
read_metadata/remove_metadata/get_document_info
wire names or behavior. Three new capabilities are additive. write_metadataand selectiveremove_metadataneed a license (they callSave); their
integration tests branch onGROUPDOCS_LICENSE_PATH.search_metadataruns everywhere.
Full Changelog: 26.7.0...26.7.1