8000 fix(mcp): cap the page offset of list_recordings, list_entities and list_topics by adeelahmad · Pull Request #200 · adeelahmad/lense · GitHub
[go: up one dir, main page]

Skip to content

fix(mcp): cap the page offset of list_recordings, list_entities and list_topics - #200

Merged
adeelahmad merged 1 commit into
mainfrom
claude/project-thread-qt650x-mcp-offsets
Oct 6, 2026
Merged

adeelahmad merged 1 commit into
mainfrom
claude/project-thread-qt650x-mcp-offsets

Conversation

@adeelahmad
Copy link
Copy Markdown
Owner

Requested by Adeel · project thread

Description

Before: the MCP tools search and get_entity capped their offsets at 10,000, but list_recordings, list_entities and list_topics accepted any offset. A huge value went straight to the database as a long scan or an error.

After: those three refuse an offset above 10,000 with the usual "offset ..." tool error, the same as search. Agents paging normally see no difference.

Motivation and Context

This answers threat-model question Q47: MCP tool arguments share the search maximums, and an argument past them is refused (P-RETRIEVAL).

Steps to reproduce (if appropriate):

The new loop in tests/api/test_mcp.py fails on main and passes here.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change; ! in the title)

Checklist:

  • The title is a Conventional Commit.
  • My code follows the code style of this project (make hooks checks it on commit).
  • I added or updated tests.
  • My change requires documentation updates, and I have updated docs/ accordingly.
  • Users need more than the title to understand it, so I wrote it under ## Unreleased in CHANGELOG.md.

🤖 Generated with Claude Code

https://claude.ai/code/session_01W42z4FbekWr33b6791svQQ


Generated by Claude Code

…ist_topics

search and get_entity already stop at 10,000; the three list tools took any
offset, so a huge one could reach the database as a long scan or an error.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01W42z4FbekWr33b6791svQQ
@adeelahmad adeelahmad self-assigned this Oct 6, 2026
@adeelahmad
adeelahmad merged commit 553cbde into main Oct 6, 2026
5 checks passed
@adeelahmad
adeelahmad deleted the claude/project-thread-qt650x-mcp-offsets branch October 6, 2026 10:33
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

0