Expense tracking MCP server with Entra authentication and Cosmos DB storage. Uses RemoteAuthProvider with AzureJWTVerifier for direct Entra authentication.
Server has 4 well-named tools with complete input schemas and enum constraints on category/payment_method. Descriptions are present and moderately detailed (60-120 chars), explaining what each tool does and access control. However, descriptions lack actionable recovery guidance for errors, output schemas are not documented, and there is no error handling guidance for LLMs. Tool composition is sound (single responsibility), but missing pagination for list_user_expenses and no documented return types. Security model (identity-aware via Entra) is strong but not reflected in tool descriptions.
Add a new expense to Cosmos DB.
Delete an expense by ID. Only the expense owner can delete their own expenses.
Get expense statistics for the authenticated user, optionally filtered by category and date range. Requires admin group membership to view other users' stats.
List all expenses for the authenticated user, with optional filtering by category and date range.
Output schemas not documented. LLMs cannot infer what fields are returned (e.g., does add_user_expense return expense_id, created_at, full_expense object?). This breaks tool chaining and forces agents to guess.
No error handling guidance. Descriptions do not explain what errors are possible or how LLMs should recover (e.g., 'If user not found, call search_users first'). Agents will fail silently on permission errors or invalid dates.
list_user_expenses lacks pagination parameters (limit, offset, page_size). Returning all expenses for a user could blow context window. No documented result limit.
Inferred effective spec: <=2025-11-25.
| Scored | Grade | Overall | Spec posture | Rubric |
|---|---|---|---|---|
| 2026-09-23 | C | 60 | <=2025-11-25 | v2 |
delete_expense description does not mention it is destructive/irreversible. No confirmation step or dry-run option. Agents may accidentally delete expenses without understanding consequences.
get_expense_stats description mentions 'admin group membership' but does not explain what happens if user lacks permission. No actionable error message for LLM.