diff --git a/everyrow-mcp/src/everyrow_mcp/app.py b/everyrow-mcp/src/everyrow_mcp/app.py index b9fd7ee5..0c31aa70 100644 --- a/everyrow-mcp/src/everyrow_mcp/app.py +++ b/everyrow-mcp/src/everyrow_mcp/app.py @@ -85,7 +85,7 @@ async def no_auth_http_lifespan(_server: FastMCP): ) -_INSTRUCTIONS_COMMON = """\ +_INSTRUCTIONS_COMMON = f"""\ You are connected to the everyrow MCP server. everyrow dispatches web research \ agents that search the internet, read pages, and return structured results for \ every row in a dataset. @@ -103,7 +103,7 @@ async def no_auth_http_lifespan(_server: FastMCP): ## Key rules - If a session_url appears in the submission response, share it with the user. If none is present, do not mention it. - Never guess or fabricate results — always wait for the task to complete. -- For small datasets (< 50 rows), prefer passing `data` directly. +- For small datasets (<= {settings.auto_page_size_threshold} rows), prefer passing `data` directly. - For larger datasets, use `everyrow_upload_data` to get an artifact_id first. """ diff --git a/everyrow-mcp/src/everyrow_mcp/config.py b/everyrow-mcp/src/everyrow_mcp/config.py index 3356ed9b..7d6dc0e0 100644 --- a/everyrow-mcp/src/everyrow_mcp/config.py +++ b/everyrow-mcp/src/everyrow_mcp/config.py @@ -89,7 +89,7 @@ class Settings(BaseSettings): description="Maximum rows allowed in inline data (list[dict]).", ) auto_page_size_threshold: int = Field( - default=50, + default=100, description="If total rows <= this value, skip asking the user for page_size and load all rows directly.", ) diff --git a/everyrow-mcp/src/everyrow_mcp/models.py b/everyrow-mcp/src/everyrow_mcp/models.py index 323fe856..b45fe5b2 100644 --- a/everyrow-mcp/src/everyrow_mcp/models.py +++ b/everyrow-mcp/src/everyrow_mcp/models.py @@ -707,7 +707,7 @@ def validate_task_id(cls, v: str) -> str: ge=0, ) page_size: int = Field( - default=50, + default=settings.auto_page_size_threshold, description=( "Number of result rows to load into your context so you can read them. " "The user has access to all rows via the widget regardless of this value. " diff --git a/everyrow-mcp/src/everyrow_mcp/tool_helpers.py b/everyrow-mcp/src/everyrow_mcp/tool_helpers.py index 075e1b62..0a163a8c 100644 --- a/everyrow-mcp/src/everyrow_mcp/tool_helpers.py +++ b/everyrow-mcp/src/everyrow_mcp/tool_helpers.py @@ -446,7 +446,7 @@ def progress_message(self, task_id: str) -> str: else: next_call = dedent(f"""\ IMPORTANT: Do NOT call everyrow_results yet.\ - 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.".\ + 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.".\ The answer the user provides will correspond to the `page_size`.\ After the user responds, call everyrow_results(task_id='{task_id}', page_size=N).""") else: diff --git a/everyrow-mcp/tests/test_stdio_content.py b/everyrow-mcp/tests/test_stdio_content.py index bc57636a..5f0a7589 100644 --- a/everyrow-mcp/tests/test_stdio_content.py +++ b/everyrow-mcp/tests/test_stdio_content.py @@ -703,7 +703,7 @@ async def test_progress_http_completed_no_output_path_hint(self): human_text = result[-1].text assert "output_path" not in human_text assert "everyrow_results" in human_text - # total=5 is below auto_page_size_threshold (50), so the model + # total=5 is below auto_page_size_threshold, so the model # should be told to load all rows directly instead of asking. assert "load all rows" in human_text.lower()