Repository navigation
Safer tag edits and fewer calls when an agent files or reads documents. Tested against Paperless-ngx 3.2.1, the latest Paperless release. No breaking changes: every new parameter is optional.
Upgrading: start a new chat after updating. A chat that was already open can keep using the old tool definitions and won't see the new parameters.
Fixed
update_documentcould silently drop tags.tagsreplaces the document's whole tag list, and the tool didn't say so, so adding one tag from an incomplete list removed the others. The newadd_tags/remove_tagschange single tags and leave the rest alone; passingtagstogether with either is refused. Every tag change, including a fulltagsreplace, now returnstag_changes: { added, removed }, so a dropped tag shows up in the result.- An empty
search_documentsresult looked final. Paperless updates its full-text index in the background, so the index can lag behind or miss documents and "No documents found" wasn't always true. The empty result now says so and points tolist_documentssearch, which matches straight from the database.
Added
get_filing_options: every tag, correspondent, document type, storage path and custom field in one call (id and name, sorted by name; tags also showis_inbox_tag, custom fields theirdata_type). One call instead of five before filing a document, and it still works when a client hasn't loaded one of thelist_*tools.list_documentsids(Paperlessid__in): read several known documents in one call.fieldsonlist_documentsandget_document: return only the fields you need, e.g.["title", "tags"].idis always included, and correspondent, type, tag and custom-field names are still resolved.get_document_contentmax_chars/offset: read a long document in slices. The result then addsoffset,total_charsandtruncated; without either parameter the output is unchanged.search_documentsmode:query(the default; advanced syntax with AND/OR/NOT, quoted phrases,field:valueand wildcards),text(plain words, no syntax) ortitle(titles only).
Changed
- Workflow trigger filters now say which trigger types use them.
sources,filter_pathandfilter_mailruleapply only to consumption-started triggers (type 1). The tag, correspondent, document-type and storage-path filters,filter_custom_field_queryand content matching apply only to added, updated and scheduled triggers (types 2–4).filter_filenameapplies to all four. list_documentssearchnow explains what it matches: a case-insensitive substring match on title, correspondent name and content, read straight from the database, where every word must appear. Usesearch_documentsfor ranked full-text search.update_documenttitlenotes that Paperless derives the stored file name from the title and replaces characters not allowed in file names (such as/), soarchived_file_namecan differ from the title.- The server instructions point to
get_filing_optionsfor looking up everything a document can be filed under.
Full Changelog: v3.2.0...v3.2.1