Commit 775b901
fix: teach single_agent to use return_table + response_schema for lists (#5113)
## Summary
- Adds defense-in-depth guidance across all 4 layers the agent reads so
it knows to set `return_table=True` + `response_schema` when using
`single_agent` for list generation
- Without these params, lists get crammed into a single `{"answer":
string}` text blob instead of a structured multi-row table
### Files changed
1. **sdk_manager.py** (system prompt) — bolded instruction on the
single_agent bullet
2. **app.py** (MCP instructions) — appended list generation guidance
3. **tools.py** (tool docstring) — added "For list generation" paragraph
+ concrete example
4. **models.py** (field descriptions) — made `response_schema` and
`return_table` descriptions prescriptive
## Test plan
- [x] Agent unit tests pass (135/135)
- [x] MCP server tests pass (356/356)
- [ ] Manual: ask everyrow-cc "Find 15 AI startups in healthcare" —
verify it sets `return_table=True` and provides a schema
- [ ] Regression: single-value queries ("What is the capital of
France?") still work without return_table
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
Sourced from commit 5a16b968f1b794df8a329e59f84f9c75db6820701 parent aabab0a commit 775b901
3 files changed
Lines changed: 16 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
89 | 89 | | |
90 | 90 | | |
91 | 91 | | |
92 | | - | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
93 | 95 | | |
94 | 96 | | |
95 | 97 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
556 | 556 | | |
557 | 557 | | |
558 | 558 | | |
559 | | - | |
| 559 | + | |
| 560 | + | |
| 561 | + | |
560 | 562 | | |
561 | 563 | | |
562 | 564 | | |
| |||
581 | 583 | | |
582 | 584 | | |
583 | 585 | | |
584 | | - | |
| 586 | + | |
| 587 | + | |
| 588 | + | |
585 | 589 | | |
586 | 590 | | |
587 | 591 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
336 | 336 | | |
337 | 337 | | |
338 | 338 | | |
| 339 | + | |
| 340 | + | |
| 341 | + | |
| 342 | + | |
339 | 343 | | |
340 | 344 | | |
341 | 345 | | |
342 | 346 | | |
| 347 | + | |
| 348 | + | |
| 349 | + | |
343 | 350 | | |
344 | 351 | | |
345 | 352 | | |
| |||
0 commit comments