Skip to content

Commit f5505da

Browse files
RafaelPogithub-actions[bot]
authored andcommitted
feat(everyrow-mcp): wire include_partial_rows and improve progress prompt (#4946)
## Summary - Wire `include_partial_rows` (default `false`) into `everyrow_progress` so callers can opt in to receiving newly completed row data alongside status counts and agent summaries - Improve the progress message prompt to ask the LLM for meaningful highlights (interesting findings, patterns, notable values) rather than a generic "briefly comment" - Add proper `Field()` descriptor with description for `include_partial_rows` on `ProgressInput` ## Test plan - [x] All 422 existing MCP server tests pass - [ ] Manual test: call `everyrow_progress` without `include_partial_rows` — should return only status + summaries, no row data - [ ] Manual test: call `everyrow_progress(include_partial_rows=true)` — should include newly completed rows - [ ] Verify LLM produces more meaningful progress updates with the new prompt 🤖 Generated with [Claude Code](https://claude.com/claude-code) --------- Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com> Sourced from commit b01635969cd1d9f2c81bcdf5f2a9fc965f0dd548
1 parent f45e28e commit f5505da

4 files changed

Lines changed: 48 additions & 6 deletions

File tree

everyrow-mcp/src/everyrow_mcp/app.py

Lines changed: 41 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -79,21 +79,58 @@ async def no_auth_http_lifespan(_server: FastMCP):
7979
agents that search the internet, read pages, and return structured results for \
8080
every row in a dataset.
8181
82+
## Getting data
83+
84+
Most operations need an input dataset. If the user provides a CSV, start from that. \
85+
Otherwise, help them find one:
86+
87+
1. **Built-in lists** — check `everyrow_browse_lists` first (fast and free). \
88+
Call with no filters to see all available lists. Many analyses start from one of these.
89+
2. **URLs** — upload from a URL or Google Sheet via `everyrow_upload_data`.
90+
3. **From memory** — if you know a good starting list, generate it as inline `data`.
91+
4. **single_agent** — dispatch a research agent to find or build a list. \
92+
Works well but slow (3-5 min), so prefer the options above.
93+
94+
## Choosing the right operation
95+
96+
1. **Forecast** — questions about the future. Best prediction accuracy.
97+
2. **Classify** — binary yes/no or categorical labels (up to ~20 categories). \
98+
More efficient than open-ended research for categorical answers.
99+
3. **Rank** — quantitative rating. Prefer an objective metric with units when possible. \
100+
Use a subjective 0-100 score only if necessary.
101+
4. **Agent** — open-ended web research when Classify, Rank, and Forecast don't fit. \
102+
Specify a response schema with descriptive column names (include units, e.g. \
103+
`population_millions`). Don't add reasoning/justification fields — users can \
104+
inspect the research behind each row.
105+
5. **Dedupe / Merge** — data consolidation.
106+
82107
## Workflow
83108
1. **Ingest data** — pass `data` (inline list of dicts) or an `artifact_id` \
84109
(from `everyrow_upload_data` or `everyrow_request_upload_url`) to any processing tool.
85-
2. **Submit** — call a processing tool (everyrow_agent, everyrow_classify, \
86-
everyrow_rank, everyrow_dedupe, everyrow_merge, everyrow_forecast). \
87-
It returns a task_id immediately.
110+
2. **Submit** — call a processing tool. It returns a task_id immediately.
88111
3. **Poll** — call `everyrow_progress(task_id)` repeatedly until the task completes. \
89-
Do NOT add commentary between progress calls — just call again immediately.
112+
When progress includes new rows or agent activity, give the user a 1-2 sentence \
113+
status update highlighting interesting findings, then call progress again. \
114+
When there are no new updates, call progress again immediately without commentary.
90115
4. **Results** — call `everyrow_results(task_id)` to retrieve the output.
91116
117+
## Session and artifact reuse
118+
119+
Every operation creates a session. After your first operation or upload, pass the \
120+
returned `session_id` to subsequent operations to keep tasks grouped. When an \
121+
operation completes, its `artifact_id` can be passed directly to the next operation \
122+
instead of re-uploading data.
123+
92124
## Key rules
125+
- Be concise. Keep summaries to 1-2 sentences. Do not output markdown tables, \
126+
bullet lists of data rows, JSON, or CSV in chat — the user can see results \
127+
directly. Only render a table if the user explicitly asks for one.
93128
- Do not share session URLs with the user unless they explicitly ask for one.
94129
- Never guess or fabricate results — always wait for the task to complete.
95130
- For small datasets (<= {settings.auto_page_size_threshold} rows), prefer passing `data` directly.
96131
- For larger datasets, use `everyrow_upload_data` to get an artifact_id first.
132+
- After presenting results, mention that the output can be used as input to another \
133+
operation (e.g. classify then rank, upload then forecast).
97134
"""
98135

99136
_INSTRUCTIONS_STDIO = (

everyrow-mcp/src/everyrow_mcp/models.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -658,6 +658,11 @@ class ProgressInput(BaseModel):
658658
"Pass this to only receive new rows and summaries since the last check. "
659659
"Omit on the first call to see all completed rows so far.",
660660
)
661+
include_partial_rows: bool = Field(
662+
default=False,
663+
description="Include newly completed rows in the progress response. "
664+
"Set to true to receive row data alongside status counts and agent summaries.",
665+
)
661666

662667
@field_validator("task_id")
663668
@classmethod

everyrow-mcp/src/everyrow_mcp/tool_helpers.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -495,7 +495,7 @@ def progress_message(
495495
progress_call = f"everyrow_progress(task_id='{task_id}'{cursor_arg})"
496496

497497
if partial_rows or summaries:
498-
msg += f"\n\nBriefly comment on these updates for the user, then immediately call {progress_call}."
498+
msg += f"\n\nProduce a concise, meaningful update: highlight any interesting findings, patterns, or notable values from the new rows and agent activity above. Then immediately call {progress_call}."
499499
else:
500500
msg += f"\nImmediately call {progress_call}."
501501

everyrow-mcp/src/everyrow_mcp/tools.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1007,7 +1007,7 @@ async def everyrow_progress(
10071007
cursor: str | None = params.cursor
10081008

10091009
if not ts.is_terminal:
1010-
if ts.completed > 0:
1010+
if ts.completed > 0 and params.include_partial_rows:
10111011
(
10121012
(partial_rows, rows_cursor),
10131013
(summaries, summary_cursor),

0 commit comments

Comments
 (0)