Review: Add hello-world MCP endpoint with get_schedule tool
Verdict: NEEDS_REFINEMENT
Template Completeness
- [x] Type -- Feature
- [x] Lineage
- [x] Repo
- [x] User Story
- [x] Context
- [x] File Targets
- [x] Acceptance Criteria
- [x] Test Expectations
- [x] Constraints
- [x] Checklist
- [x] Related
Traceability
- [ ] story:ai-assistant label -- NO matching user story in project-westside-basketball user-stories section. No WS-S* code exists for AI assistant functionality. [SCOPE] Create user story entry on project-westside-basketball user-stories section (Admin stories) with a WS-S* code for AI assistant.
- [ ] story note MISSING --
story-westside-basketball-ai-assistantreferenced in Lineage does not exist as a pal-e-docs note. [SCOPE] Create story notestory-westside-basketball-ai-assistantor add the story to the project page with a proper WS-S* code. - [ ] arch:dataflow label -- no
arch-datafloworarch-dataflow-westside-basketballnote exists in pal-e-docs. [SCOPE] Create architecture note for the dataflow component. - [x] Forgejo issue -- #454, open, valid URL
File Targets
- [x]
src/basketball_api/mcp_server.py(create) -- does not exist yet, correct - [x]
src/basketball_api/routes/mcp.py(create) -- does not exist yet, correct - [x]
src/basketball_api/main.py(modify) -- exists, contains router registration pattern viaapp.include_router() - [x]
pyproject.toml(modify) -- exists,mcpnot yet in dependencies - [x]
src/basketball_api/routes/schedule.py(do not touch) -- exists, correctly excluded
Repo Placement
OK. Issue filed on forgejo_admin/basketball-api, all file targets are in basketball-api. Single-repo scope.
Dependencies
No blocking dependencies found on board-westside-basketball. Item #729 (Add read-only SQL tool with Postgres access) is related but independent -- it targets a different MCP tool and is in backlog. The existing
GET /public/schedule endpoint in routes/public.py confirms the data layer already works. The get_db dependency pattern is used across 10+ route files.Acceptance Criteria
6 ACs, all verifiable by an agent:
- [x]
mcppackage in pyproject.toml -- grep-verifiable - [x] MCP server mounts at /mcp -- route registration verifiable in main.py
- [x] get_schedule tool returns schedule data -- testable via pytest
- [x] Streamable HTTP transport -- testable via HTTP POST
- [x] Existing endpoints unaffected -- run full test suite
- [x] Health check passes -- testable via existing health endpoint
Blast Radius
Low. New endpoint on a new path (
/mcp). No auth (hello-world scope), which the ticket explicitly acknowledges as deferred. No changes to existing routes or models. The mcp Python SDK is a new dependency -- agent should pin a version range. No other services in the platform consume MCP yet, so no downstream impact.Decomposition Assessment
2 files to create, 2 files to modify, 1 repo, 6 ACs. Estimated agent time: ~3 minutes. No decomposition needed.
Recommendation
[SCOPE]Create user story entry in project-westside-basketball user-stories section (Admin stories) with a WS-S* code for "As an admin, I want to ask Claude questions about my business and get live data so that I can manage operations through conversation." Then update the board item label fromstory:ai-assistanttostory:WS-S{N}.[SCOPE]Create story notestory-westside-basketball-ai-assistantreferenced in issue Lineage, or align Lineage to use the WS-S* code.[SCOPE]Create architecture notearch-dataflow(or more specificarch-dataflow-westside-basketball) documenting the MCP data flow component.