-
-
Notifications
You must be signed in to change notification settings - Fork 706
Open
Description
Description
When using the CUA MCP server's computer_screenshot tool with Claude's API, screenshots are being returned with dimensions that exceed the API's maximum allowed size for many-image requests (2000 pixels).
Error Message
API Error: 400 {"type":"error","error":{"type":"invalid_request_error","message":"messages.23.content.19.image.source.base64.data: At least one of the image dimensions exceed max allowed size for many-image requests: 2000 pixels"},"request_id":"req_011CXLuG7Z49CpQtVZU2jfKe"}
Context
- The error occurs when calling
computer_screenshotfrom the MCP server - The API has a limit of 2000 pixels for image dimensions in many-image requests
- The screenshot is being returned at its native resolution without resizing
Expected Behavior
Screenshots should be automatically resized/scaled to ensure they don't exceed the 2000 pixel limit on any dimension before being returned to the API.
Suggested Solution
The MCP server's screenshot functionality should:
- Check the dimensions of the captured screenshot
- If either dimension exceeds 2000 pixels, scale the image down proportionally
- Return the resized image that fits within the API limits
This is similar to the recent fix for 1MB file size compression (commit d9204b8), but for image dimensions instead of file size.
Environment
- CUA MCP Server
- Claude API
Metadata
Metadata
Assignees
Labels
No labels