Skip to content

MCP get_message: clamp max_chars above 4000 to cap#12

Closed
endolith wants to merge 1 commit into
split/pr4-search-message-bodiesfrom
cursor/get-message-max-chars-clamp-57ac
Closed

MCP get_message: clamp max_chars above 4000 to cap#12
endolith wants to merge 1 commit into
split/pr4-search-message-bodiesfrom
cursor/get-message-max-chars-clamp-57ac

Conversation

@endolith

Copy link
Copy Markdown
Owner

Summary

Fixes ambiguous get_message max_chars boundary behavior: values above 4000 now clamp to the cap (4000) instead of silently falling back to the default (2000).

Changes

  • max_chars > 4000 → clamp to 4000
  • max_chars <= 0 → use default 2000 (unchanged)
  • Updated tool description and added tests for both cases
Open in Web Open in Cursor 

Values above maxBodyChars (4000) previously fell back to the default
(2000). Now they clamp to the cap like limitArg does for list limits.
Zero or negative values still use the default.

Co-authored-by: endolith <endolith@gmail.com>
@endolith

Copy link
Copy Markdown
Owner Author

Close in favor of #15

@endolith endolith deleted the cursor/get-message-max-chars-clamp-57ac branch June 25, 2026 23:54
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.

2 participants