Shrink get_page_image's tool result to avoid CLIJSONDecodeError #1
No reviewers
Labels
No labels
Compat/Breaking
Kind/Bug
Kind/Documentation
Kind/Enhancement
Kind/Feature
Kind/Security
Kind/Testing
Priority
Critical
Priority
High
Priority
Low
Priority
Medium
Reviewed
Confirmed
Reviewed
Duplicate
Reviewed
Invalid
Reviewed
Won't Fix
Status
Abandoned
Status
Blocked
Status
Need More Info
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
selfhosted-bg/eprosveta-mcp!1
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "fix/shrink-page-image-for-vision"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Shrink get_page_image's tool result to avoid CLIJSONDecodeError
A full-resolution page PNG (pages render up to ~2136x2904), once
base64-encoded for the MCP wire format and relayed through the Claude
CLI's stream-json stdout, could exceed the Claude Agent SDK's default
1 MiB per-line buffer -- this caused real CLIJSONDecodeError failures
mid-turn for students reading a heavy workbook page. Downscale to at
most 1600px on the long edge and fall back to JPEG at decreasing
quality if still over budget; get_page_image_url/_serve_page_image
stay full-resolution since those are for a human directly viewing the
page.