Skip to content

MCP: windowed get_message body reading#10

Closed
endolith wants to merge 1 commit into
mainfrom
split/pr2-get-message-paging
Closed

MCP: windowed get_message body reading#10
endolith wants to merge 1 commit into
mainfrom
split/pr2-get-message-paging

Conversation

@endolith

Copy link
Copy Markdown
Owner

Summary

Adds windowed body reading to get_message so LLM clients can page through large message bodies without flooding the context window.

Changes

  • get_message returns body_length, body_returned, offset, has_more instead of the full body
  • max_chars (default 2000, max 4000) and offset for paging; center_at to center on a match from search_in_message
  • Strips body_html from MCP responses

Stack

Rebased onto main after kenn-io#388 (pagination). Next: #8 search_in_message, #9 search_message_bodies.

Open in Web Open in Cursor 

@cursor cursor Bot force-pushed the split/pr2-get-message-paging branch from d19db97 to 0292d76 Compare June 19, 2026 19:07
Add offset, max_chars, and center_at parameters to get_message. Response
includes body_length, body_returned, and has_more for paging. Strips HTML
from returned body. Adds bodyByteSlice UTF-8-safe slicing and contextWindow
for centered reading.

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

Copy link
Copy Markdown
Owner Author

Close in favor of #15

@endolith endolith closed this Jun 25, 2026
@endolith endolith deleted the split/pr2-get-message-paging 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