Backend for the MCP (Merchant Collection Partner) System - manages pickup partners, orders, wallets, and transactions
This Express backend exposes 27 tools via HTTP REST endpoints, but lacks MCP protocol integration entirely. Tools have basic descriptions (10-50 chars, well below the 194-char baseline) and input schemas are present but minimal. No output schemas documented. Critical gaps: no error recovery guidance, no tool annotations (readOnlyHint/destructiveHint), no pagination metadata in list responses, no idempotency markers. Tool names are verb-noun (good), but descriptions are generic and do not explain WHEN to use each tool or what happens on failure. Parameters lack format constraints and dependency documentation. Security concerns: passwords exposed as parameters, no audit trail visible, no permission gates in tool definitions.
Add funds to wallet
Add a Pickup Partner
Assign order to pickup partner
Change password
Create new order
MCP: Create and assign pickup
Delete a Pickup Partner
MCP: Filter pickups
Get all Pickup Partners
Passwords exposed as tool parameters (register, addPartner, login). Credentials must never appear in parameters, use server-side secret injection via environment variables or vault. Agent traces log every parameter, leaking secrets into logs and prompt history.
No output schemas documented for any tool. LLMs cannot plan downstream calls or extract required fields (e.g., user_id, order_id) without knowing response structure. Baseline: 100% of A+ tools document return types.
Descriptions are generic and under 50 chars (baseline 194 chars). They do not explain WHEN to use each tool, what happens on failure, or dependencies. E.g., 'Get all Pickup Partners' lacks context for tool selection. Descriptions should be 50-200 chars and prompt-engineered.
| Scored | Grade | Overall | Spec posture | Rubric |
|---|---|---|---|---|
| 2026-09-23 | F | 29 | 2026-07-28+ | v2 |
Get all transactions (admin side)
Pickup Partner: View assigned pickups
Get order details
Get order statistics
Get orders with filters
Get transaction history of a pickup partner
Get current user profile
Get transaction history with filters
Get wallet balance and recent transactions
Login user
MCP credits/debits wallet of Pickup Partner
Register new user (MCP or Pickup Partner)
Transfer funds to pickup partner
Update order status
Update Partner Status or Commission
Partner: Update pickup status
Update user profile
Withdraw funds from wallet
No tool annotations (readOnlyHint, destructiveHint, idempotentHint). LLMs cannot distinguish safe reads from destructive writes (deletePartner, withdrawFunds) without explicit hints. This risks accidental data loss.
No pagination metadata in list responses (getAllPartners, getOrders, getAllTransactions). Tools accept limit/page params but responses lack total_count or next_cursor. Large result sets will blow context windows without proper pagination guidance.