A calorie and nutrition tracking MCP server with support for food logging, meal tracking, and daily nutritional summaries.
The server defines 5 tools with basic structure, names, and descriptions. All tools are explicitly registered with @mcp.tool() decorators and have input schemas. However, descriptions are generic and lack LLM-optimization guidance. Parameter descriptions exist but are minimal (10-30 chars). Output schemas are not formally documented. Error handling is present but limited (single 'Food not found' check in log_food). Security patterns for input validation are weak. The schema quality is adequate but not excellent, parameters lack constraints, enums, ranges, and validation rules. The naming is mostly clear (verb_noun convention) but descriptions don't answer WHEN to use each tool or explain state-changing implications clearly.
Add or update a food.
Get meals and their logged foods for a given date (ISO). Defaults to today.
Log food eaten today (quantity = servings) and record meal name/type.
Set daily calorie goal.
Get today's calorie & macro summary.
Minimal parameter descriptions lack actionable context. E.g., 'Protein content per serving in grams' is clear, but 'Meal type/name (default: unspecified)' doesn't explain WHEN to use breakfast vs lunch vs custom names, or what the LLM should infer when the user doesn't specify.
No output schemas documented. Callers cannot predict the structure of responses. E.g., add_food returns {status, food, db_path} but db_path is an implementation detail that shouldn't leak into responses; get_meals returns nested meal/food structures without formal type specification.
No input validation or constraint declarations. Parameters like 'calories' and 'quantity' accept any integer/number but lack min/max bounds, enums for 'meal', or regex patterns. LLMs can pass negative calories or impossibly large values without guidance.
| Scored | Grade | Overall | Spec posture | Rubric |
|---|---|---|---|---|
| 2026-09-22 | D | 54 | 2026-07-28+ | v2 |
| 2026-03-09 | F | 47 | - | v1 |
Error handling is minimal. log_food returns {status: error, message: 'Food not found'} with no guidance on next steps (e.g., 'Call add_food to create the food first'). No recovery hints, no retryable vs fatal classification.
Tool descriptions don't clarify state-changing implications. add_food uses INSERT OR REPLACE (idempotent), but description doesn't say 'idempotent'; log_food creates new records (not idempotent), but description doesn't warn agents about retry risks.
Responses leak implementation details. add_food returns 'db_path' (a filesystem path), which should never appear in agent outputs. This violates separation of concerns and hints at backend structure to potential attackers.
Database path hardcoded in source with fallback logic to /data, /tmp, or current directory. While writable-location detection is good, the choice of location should not be visible to the agent. This leaks environment/infra details.