Skip to content

Commit bba1cd8

Browse files
RafaelPogithub-actions[bot]
authored andcommitted
fix(mcp): strip heavy fields from progress, remove ToolSearch, fix rename (#4953)
## Summary - **Strip heavy fields from progress messages** — `_source_bank`, `research`, `provenance_and_notes` were being dumped as raw JSON in `everyrow_progress` partial rows, causing 335KB+ tool results that blew up agent context. Now resolved citations first (needs `_source_bank`), then stripped before serializing. - **Remove ToolSearch from agent tools** — all tool schemas (built-in + MCP) are loaded upfront, so deferred discovery adds no value and wastes tokens. - **Contextual follow-up suggestions** — system prompt now tells the agent to suggest specific next operations based on the task output columns, instead of generic chaining examples. - **Fix Docker rename artifacts** — `.dockerignore` and `Dockerfile` still referenced `everyrow-mcp/` after the `futuresearch-python` rename, breaking local `docker compose` builds. ## Test plan - [x] MCP server tests pass (415 passed) - [ ] Run a rank/classify task locally and verify progress messages are small - [ ] Verify agent suggests contextual follow-ups after task completion - [ ] Verify `docker compose up --build` works with the fixed Dockerfile 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com> Sourced from commit 6e2c84fa6761ee50eb254245cb9a799e96a3d6d0
1 parent 7b6b5a5 commit bba1cd8

3 files changed

Lines changed: 14 additions & 10 deletions

File tree

.dockerignore

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
!src/**
1212

1313
# MCP server package
14-
!everyrow-mcp/pyproject.toml
15-
!everyrow-mcp/README.md
16-
!everyrow-mcp/src/
17-
!everyrow-mcp/src/**
14+
!futuresearch-mcp/pyproject.toml
15+
!futuresearch-mcp/README.md
16+
!futuresearch-mcp/src/
17+
!futuresearch-mcp/src/**

futuresearch-mcp/deploy/Dockerfile

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,11 @@ WORKDIR /app
77
# Copy workspace root pyproject + lock + README, then each package
88
COPY --link pyproject.toml uv.lock README.md ./
99
COPY --link src/ ./src/
10-
COPY --link everyrow-mcp/pyproject.toml everyrow-mcp/README.md ./everyrow-mcp/
11-
COPY --link everyrow-mcp/src/ ./everyrow-mcp/src/
10+
COPY --link futuresearch-mcp/pyproject.toml futuresearch-mcp/README.md ./futuresearch-mcp/
11+
COPY --link futuresearch-mcp/src/ ./futuresearch-mcp/src/
1212

13-
# Install everyrow-mcp and its dependencies (includes workspace everyrow package)
14-
RUN uv sync --package everyrow-mcp --no-dev --no-sources --no-editable
13+
# Install futuresearch-mcp and its dependencies (includes workspace everyrow package)
14+
RUN uv sync --package futuresearch-mcp --no-dev --no-sources --no-editable
1515

1616
# Stage 2: Slim runtime
1717
FROM python:3.13-slim
@@ -33,4 +33,4 @@ USER mcp
3333
HEALTHCHECK --interval=30s --timeout=5s --retries=3 \
3434
CMD python -c "import urllib.request; urllib.request.urlopen('http://localhost:8000/health')"
3535

36-
CMD ["everyrow-mcp", "--http", "--port", "8000", "--host", "0.0.0.0"]
36+
CMD ["futuresearch-mcp", "--http", "--port", "8000", "--host", "0.0.0.0"]

futuresearch-mcp/src/futuresearch_mcp/tool_helpers.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -487,10 +487,14 @@ def progress_message(
487487
msg += "\n\nAgent activity:" + _format_summary_lines(summaries)
488488

489489
if partial_rows:
490+
# Resolve citations first (needs _source_bank), then strip
491+
# heavy internal fields to avoid blowing up context.
492+
_STRIP = {"_source_bank", "research", "provenance_and_notes"}
490493
resolved = resolve_citations_in_records(partial_rows)
491494
msg += "\n\nNewly completed rows:"
492495
for row in resolved:
493-
msg += f"\n- {json.dumps(row, default=str)}"
496+
light = {k: v for k, v in row.items() if k not in _STRIP}
497+
msg += f"\n- {json.dumps(light, default=str)}"
494498

495499
progress_call = f"futuresearch_progress(task_id='{task_id}'{cursor_arg})"
496500

0 commit comments

Comments
 (0)