Skip to content

Add tag parent support and log request bodies#1

Open
zagah wants to merge 6 commits intobarryw:mainfrom
zagah:main
Open

Add tag parent support and log request bodies#1
zagah wants to merge 6 commits intobarryw:mainfrom
zagah:main

Conversation

@zagah
Copy link

@zagah zagah commented Feb 22, 2026

[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.

## [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.
@zagah
Copy link
Author

zagah commented Feb 22, 2026

Fix build issues

@zagah zagah closed this Feb 22, 2026
@zagah zagah reopened this Feb 22, 2026
zagah and others added 2 commits February 22, 2026 14:06
…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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant