Skip to content

Let read_paper start at a byte offset the caller already holds - #35

Merged
NielsRogge merged 1 commit into
mainfrom
claude/mcp-read-paper-offset
Oct 22, 2026
Merged

NielsRogge merged 1 commit into
mainfrom
claude/mcp-read-paper-offset

Conversation

@NielsRogge

Copy link
Copy Markdown
Collaborator

Summary

  • read_paper accepts an optional offset (MCP-only, UTF-8 byte offset, >= 0). Without a cursor, the first chunk starts at that byte; the returned next_cursor then continues as before.
  • offset and cursor together are rejected with pass either cursor or offset, not both.
  • Lets chat continue a paper from the byte count of text already in context, instead of restarting at the title.

Verification

  • uv run --offline pytest -q tests in mcp_server: 86 passed, including the new test_read_paper_starts_at_an_offset_and_then_continues_with_a_cursor.
  • Lint not run: ruff is not installed in this environment.

Deploy note

The chat change (paperswithcode PR, branch claude/paper-reader-read-offset) sends offset. Deploy this MCP server before enabling that chat change.

🤖 Generated with Claude Code

Callers that were given the start of a paper in context can continue
from the byte count of that text instead of restarting at byte zero.
offset is MCP-only, cannot be combined with cursor, and the returned
cursor continues as before.

Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
@NielsRogge
NielsRogge merged commit d89e1ef into main Oct 22, 2026
2 checks passed
@NielsRogge
NielsRogge deleted the claude/mcp-read-paper-offset branch October 22, 2026 13:08
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.

1 participant