FastMCP server for tracking expenses with SQLite database backend. Allows adding, listing, and summarizing expense entries by category.
The Expense Tracker server has three tools with basic schemas and descriptions, but significant gaps in parameter documentation, output schema clarity, and error handling guidance. Tool names follow the verb_noun convention (add_expense, list_expenses, summarize), which is good. However, parameter descriptions lack detail about format/validation constraints, and error responses are generic rather than actionable. The code shows async/await usage and basic exception handling, but does not guide the LLM on recovery steps or provide structured error classification. Overall, this is a typical mid-tier community server with room for improvement in parameter rigor and error recovery patterns.
Add a new expense entry to the database.
List expense entries within an inclusive date range.
Summarize expenses by category within an inclusive date range.
Parameter descriptions lack format/constraint details. 'date' parameter has no format specification (ISO 8601? timezone handling?), 'amount' has no range (negative allowed? currency precision?), 'category' has no enum or validation rules despite hardcoded list in categories resource.
Error handling is generic ('Database error: {str(e)}') and does not guide LLM recovery. No distinction between retryable errors, user-fixable errors, or fatal errors. Error messages should suggest next steps (e.g., 'Check date format' or 'Contact administrator').
Output schemas not documented. list_expenses and summarize return lists of dicts but no schema definition for callers. Field names, types, and presence rules are implicit. add_expense returns {status, id, message} on success but {status, message} on error, inconsistent shape.
| Scored | Grade | Overall | Spec posture | Rubric |
|---|---|---|---|---|
| 2026-09-22 | D | 55 | 2026-07-28+ | v2 |
| 2026-03-09 | F | 41 | - | v1 |
'category' parameter in add_expense lacks enum constraint. Categories are available in the categories resource but not enforced as input constraints. LLM may pass invalid categories, forcing runtime failure instead of upfront validation.
Missing pagination support. list_expenses returns all results in date range without limit or offset. A user querying 5 years of expenses could receive thousands of items, exhausting context window and degrading LLM reasoning.
Tool descriptions are brief (20-30 chars) and lack context on when to use each tool. E.g., 'List expense entries within an inclusive date range' does not explain what fields are returned, whether it's for review or analysis, or when to use summarize() instead.
No idempotency guarantees. add_expense does not prevent duplicate inserts if retried. Without idempotency keys or deduplication, agent retries risk creating duplicate expense records.
Default values for 'subcategory' and 'note' are empty strings. While safe, descriptions should clarify that these are optional and document the default behavior (e.g., 'Defaults to empty string if omitted').