Batch bot setup (create_bot addToArena / bulk add)
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 55/100
- Issue type
- Feature
- Clarity
- Clearly specified
- Activity status
- Active
- Tech stack
- javascript, typescript
Research direction
Start with server/src/api/mcp.ts and the existing add_app_to_arena tool, then check the app limits in server/src/api/app.ts and the related API tests in server/test/api.test.ts. Reuse the single-add checks and arena update flow for the bulk path, and decide how it reports partial failures. Done means callers can create multiple bots and add them to an arena within existing caps, with tests covering the cap boundaries.
Written by the indexing model from the issue text.
Description
A create_bot(…, addToArena) option (or a bulk add) — standing up a 5-bot tournament arena is otherwise ~10 separate calls.
Effort: S
Migrated from ENHANCEMENTS.md (§6 AI / MCP integration).
Implementation notes
Priority: low — Pure MCP-tool ergonomics/efficiency for agent callers with no effect on core UX, stability, or security; existing per-item tools already cover the functionality.
Purpose
Standing up a 5-bot tournament arena today takes ~10 round-trip MCP calls (5x create_app + 5x add_app_to_arena), which is slow, token-heavy, and error-prone for an AI agent driving the API. A batch/bulk entry point collapses this into 1-2 calls, directly speeding up the run_tournament/run_match workflows the MCP surface already optimizes for.
Implementation approach
- Extend
server/src/api/mcp.ts: add a new tool (e.g.create_appsor abots: [{name, source}]array param oncreate_app) plus anarenaId/addToArenaoption that, afterappService.create, also runs the existingadd_app_to_arenabody (arena ownership check,MAX_APPS_PER_ARENAcap,arenaMemberService.create,env.addApp) in a loop — reuse that logic rather than duplicating it (factor the single-add body into a shared helper called by bothadd_app_to_arenaand the new bulk tool). - Respect existing caps in the same file:
MAX_APPS_PER_ARENA = 4(5 total incl. the +1) andMAX_ARENAS_PER_USER; also checkMAX_APPS_PER_USER(server/src/api/app.ts) before creating N apps so a bulk call fails fast/atomically rather than partially succeeding. - No REST or bot-facing
compiler.tsAPI changes needed — this is MCP-tool ergonomics only, not a sandbox/bot-API change. No UI change required either (the UI creates bots one at a time via its own flow); this is purely for MCP/agent callers. - Update the
write_bot/run_matchprompt text (same file, ~lines 1160-1240) to mention the new bulk path once it exists.
Key details to plan
- No DB migration needed:
appService.create/arenaMemberService.createare existing calls, just looped or transactionally batched; note the general lack of migrations (#142) if any schema tweak were needed (none expected here). - Decide partial-failure semantics: if bot 3 of 5 hits
MAX_APPS_PER_USERorMAX_APPS_PER_ARENA, return which succeeded vs failed rather than a silent partial state — keepadd_app_to_arena's existing per-item checks (already-in-arena, ownership). - Testing: extend
server/test/api.test.ts(and MCP-specific tests if present) with a bulk-create-and-add case exercising the cap boundaries; no changes tosimulation.test.ts/compiler.test.ts/arenaReducer.test.tssince sim/UI/sandbox are untouched. - Determinism/SSE unaffected — bots still enter via
env.addAppand are picked up onrestart_arenaexactly as today. - Related: complements
run_tournament(already implemented inmcp.ts, ~line 771) which assumes the roster is already populated — this issue is the missing "fill the roster fast" half. - Effort matches the S label: small, additive, no cross-cutting sim/UI risk; main risk is get the partial-failure/cap-check semantics right.
- Dominant language
- TypeScript
- Stars
- 0
- Forks
- 0
- Avg merge
- 8m
- Merged PRs (30d)
- 8
Getting set up
Starts the project's dev container in your browser, under your own GitHub account.
- No Dockerfile or Docker Compose file
- No pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from LeeAdcock/robocodeJs.com
-
priority: medium tech-debt
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
LeeAdcock/robocodeJs.com#411 ·
Maintainers usually reply within 1 day
-
enhancement priority: medium
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
LeeAdcock/robocodeJs.com#254 ·
Maintainers usually reply within 1 day
-
good first issue priority: low tech-debt
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
LeeAdcock/robocodeJs.com#146 ·
Maintainers usually reply within 1 day
-
dependencies priority: low tech-debt
Difficulty 1/5 Under an hour Newbie friendliness 15/100
LeeAdcock/robocodeJs.com#413 ·
Maintainers usually reply within 1 day
-
priority: low tech-debt
Difficulty 3/5 Half a day Newbie friendliness 32/100
LeeAdcock/robocodeJs.com#412 ·
Maintainers usually reply within 1 day
All issues in LeeAdcock/robocodeJs.com
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
db-ux-design-system/core-web#8461 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 1 day
-
Cannot run an integration on windows when power shell is selected as the default profile terminalOpenPriority/Blocker Type/Bug
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
wso2/product-integrator#2767 ·
Maintainers usually reply within 1 day
-
Difficulty 1/5 Under an hour Newbie friendliness 85/100
-
severity:low
Difficulty 1/5 1-3 hours Newbie friendliness 84/100
Maintainers usually reply within 1 day