Skip to content

Commit 078211b

Browse files
RafaelPoclaude
andauthored
chore: bump auto_page_size_threshold to 100 (#253)
* chore: bump auto_page_size_threshold from 50 to 100 Skip the page_size prompt for datasets up to 100 rows instead of 50, reducing unnecessary user interactions for small datasets. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * fix: replace hardcoded 50 references with settings.auto_page_size_threshold - models.py: page_size default now uses the config value - tool_helpers.py: agent prompt uses dynamic threshold instead of literal "50" - app.py: instructions use f-string with threshold setting - test comment: removed hardcoded value Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 65cf128 commit 078211b

5 files changed

Lines changed: 6 additions & 6 deletions

File tree

everyrow-mcp/src/everyrow_mcp/app.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ async def no_auth_http_lifespan(_server: FastMCP):
8585
)
8686

8787

88-
_INSTRUCTIONS_COMMON = """\
88+
_INSTRUCTIONS_COMMON = f"""\
8989
You are connected to the everyrow MCP server. everyrow dispatches web research \
9090
agents that search the internet, read pages, and return structured results for \
9191
every row in a dataset.
@@ -103,7 +103,7 @@ async def no_auth_http_lifespan(_server: FastMCP):
103103
## Key rules
104104
- If a session_url appears in the submission response, share it with the user. If none is present, do not mention it.
105105
- Never guess or fabricate results — always wait for the task to complete.
106-
- For small datasets (< 50 rows), prefer passing `data` directly.
106+
- For small datasets (<= {settings.auto_page_size_threshold} rows), prefer passing `data` directly.
107107
- For larger datasets, use `everyrow_upload_data` to get an artifact_id first.
108108
"""
109109

everyrow-mcp/src/everyrow_mcp/config.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ class Settings(BaseSettings):
8989
description="Maximum rows allowed in inline data (list[dict]).",
9090
)
9191
auto_page_size_threshold: int = Field(
92-
default=50,
92+
default=100,
9393
description="If total rows <= this value, skip asking the user for page_size and load all rows directly.",
9494
)
9595

everyrow-mcp/src/everyrow_mcp/models.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -707,7 +707,7 @@ def validate_task_id(cls, v: str) -> str:
707707
ge=0,
708708
)
709709
page_size: int = Field(
710-
default=50,
710+
default=settings.auto_page_size_threshold,
711711
description=(
712712
"Number of result rows to load into your context so you can read them. "
713713
"The user has access to all rows via the widget regardless of this value. "

everyrow-mcp/src/everyrow_mcp/tool_helpers.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -446,7 +446,7 @@ def progress_message(self, task_id: str) -> str:
446446
else:
447447
next_call = dedent(f"""\
448448
IMPORTANT: Do NOT call everyrow_results yet.\
449-
First, ask the user: "The task produced {self.total} rows. How many would you like me to load into my context so I can read them? (default: 50). You will have access to all of them via the widget.".\
449+
First, ask the user: "The task produced {self.total} rows. How many would you like me to load into my context so I can read them? (default: {settings.auto_page_size_threshold}). You will have access to all of them via the widget.".\
450450
The answer the user provides will correspond to the `page_size`.\
451451
After the user responds, call everyrow_results(task_id='{task_id}', page_size=N).""")
452452
else:

everyrow-mcp/tests/test_stdio_content.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -703,7 +703,7 @@ async def test_progress_http_completed_no_output_path_hint(self):
703703
human_text = result[-1].text
704704
assert "output_path" not in human_text
705705
assert "everyrow_results" in human_text
706-
# total=5 is below auto_page_size_threshold (50), so the model
706+
# total=5 is below auto_page_size_threshold, so the model
707707
# should be told to load all rows directly instead of asking.
708708
assert "load all rows" in human_text.lower()
709709

0 commit comments

Comments
 (0)