Add tag parent support and log request bodies#1
Open
zagah wants to merge 6 commits intobarryw:mainfrom
Open
Conversation
## [2026-02-20] - Nested Tag Support & Logging
### Added
- **Nested Tag Support:**
- Updated `PaperlessMCP/Models/Tags/Tag.cs` to include the `parent` property in `Tag`, `TagCreateRequest`, and `TagUpdateRequest` records.
- Updated `PaperlessMCP/Tools/TagTools.cs` to expose the `parent` parameter in the `Create` and `Update` MCP tools.
- **Diagnostic Logging:**
- Modified `PaperlessMCP/Client/PaperlessClient.cs` to log the URL and JSON body of all `POST` and `PATCH` requests. This was used to verify that request bodies were being serialized correctly.
### Fixed
- Resolved an issue where tag creation/updates were failing with "This field is required" errors due to missing fields in the serialization models.
Author
|
Fix build issues |
…runtime type serialization Replace PostAsJsonAsync<object> and PatchAsJsonAsync<object> in PostWithResultAsync and PatchWithResultAsync with StringContent + explicit JsonSerializer.Serialize using request.GetType(). This ensures the runtime type is used for serialization, matching the log output and fixing update tools that were silently sending malformed bodies. Also extract BulkEditRequest model and apply the same StringContent pattern to BulkEditDocumentsAsync for consistency. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
[2026-02-20] - Nested Tag Support & Logging
Added
PaperlessMCP/Models/Tags/Tag.csto include theparentproperty inTag,TagCreateRequest, andTagUpdateRequestrecords.PaperlessMCP/Tools/TagTools.csto expose theparentparameter in theCreateandUpdateMCP tools.PaperlessMCP/Client/PaperlessClient.csto log the URL and JSON body of allPOSTandPATCHrequests. This was used to verify that request bodies were being serialized correctly.Fixed