30 lines
1.1 KiB
Markdown
30 lines
1.1 KiB
Markdown
# Project: update_category_image
|
|
|
|
## Architecture
|
|
- Database Schema: `Category` model in Prisma has an `imageUrl` field.
|
|
- Backend API: `apps/backend/src/routes/categories.ts` handles category operations.
|
|
- MCP Server: `apps/mcp-server/index.ts` exposes MCP tools to agents.
|
|
|
|
## Milestones
|
|
| # | Name | Scope | Dependencies | Status |
|
|
|---|------|-------|-------------|--------|
|
|
| M1 | Backend Implementation | Expose `PATCH /api/categories/:id/image` in `apps/backend/src/routes/categories.ts` | None | DONE |
|
|
| M2 | MCP Tool Implementation | Add `update_category_image` tool schema and handler in `apps/mcp-server/index.ts` | M1 | DONE |
|
|
| M3 | Verification & Auditing | Compile the monorepo, test the tool end-to-end, and run Forensic Auditor. | M2 | DONE |
|
|
|
|
## Interface Contracts
|
|
### Backend API
|
|
- `PATCH /api/categories/:id/image`
|
|
- Body: `{ imageUrl: string }`
|
|
- Response: Updated Category object
|
|
|
|
### MCP Tool Schema
|
|
- Name: `update_category_image`
|
|
- Input Schema:
|
|
- `id`: number (required)
|
|
- `imageUrl`: string (required)
|
|
|
|
## Code Layout
|
|
- Backend routes: `apps/backend/src/routes/categories.ts`
|
|
- MCP server: `apps/mcp-server/index.ts`
|