Add vision-ready Paperless document retrieval - #224
Conversation
Expose thumbnails, image previews, and PDFs as native MCP media so models can inspect orientation and read document content without decoding base64 envelopes. 💘 Generated with Crush Assisted-by: Crush:gpt-5.6 Co-Authored-By: GPT-5.6 <noreply@anthropic.com>
acmacalister
left a comment
There was a problem hiding this comment.
Nice addition — native ImageContent/EmbeddedResource for Paperless thumbnails and previews is the right shape, and the unit + live coverage around it looks solid. CI is green (build/test/lint/security/rust-sdk/compose). A couple of follow-ups inline: project-scoped execute still drops Media, and the response size check only sees the metadata JSON.
Preserve media on project-scoped endpoints, apply response limits to binary payloads, and use predictable file extensions for common image formats. 💘 Generated with Crush Assisted-by: Crush:gpt-5.6 Co-Authored-By: GPT-5.6 <noreply@anthropic.com>
acmacalister
left a comment
There was a problem hiding this comment.
CI is green (build/test/lint/security/rust-sdk/compose) and the follow-ups from the earlier pass look solid — shared toolResultContent/toolResultBytes, project-router parity, JPEG extension map. One real functional gap left: media is now counted toward the 50KB server cap, but Paperless never raises that cap for thumbnail/preview, so typical documents will fail on the MCP path even though adapter + unit tests pass.
Raise response headroom only for thumbnail and preview tools so real documents pass through the media-aware server limit while other Paperless responses keep the default cap. 💘 Generated with Crush Assisted-by: Crush:gpt-5.6 Co-Authored-By: GPT-5.6 <noreply@anthropic.com>
acmacalister
left a comment
There was a problem hiding this comment.
Clean PR — CI is green across build/test/lint/security/rust-sdk/compose, and the earlier follow-ups (shared media conversion on both execute surfaces, media bytes in the response cap, stable JPEG extensions, and 5MB per-tool headroom for thumbnail/preview) all look correctly wired. LGTM.
Summary
Test plan
PAPERLESS_LIVE_TEST=1 go test ./integrations/paperless -run '^TestLiveDocumentVision$' -vagainstpaperless.fleet.clark.teammake ci💘 Generated with Crush