An MCP server for managing employee leave balances and leave applications
LeaveManager has 3 tools with basic verb-based naming and present descriptions, but suffers from critical gaps in output documentation, parameter constraints, and error handling. Naming is acceptable (get_leave_balance, apply_leave, get_leave_history follow verb_noun convention). Descriptions are present but generic and lack context on WHEN to use each tool or WHAT depends on what. Input schemas are visible and typed, but output schemas are completely undocumented, the tools return free-text strings instead of structured JSON, forcing LLMs to parse unstructured output. Parameter descriptions exist but lack validation constraints (e.g., date format for leave_dates, employee_id format). Error handling is minimal, 'Employee ID not found' and 'Insufficient leave balance' lack recovery guidance. The apply_leave tool modifies state but the description does not explicitly state this, violating the command-tool pattern. No pagination, no enums, no dependency hints. This server represents a functional but below-baseline implementation.
Apply leave for specific dates (e.g., ["2025-04-17", "2025-05-01"])
Check how many leave days are left for the employee
Get leave history for the employee
All tools return free-text strings instead of structured JSON objects. LLMs cannot reliably parse unstructured responses and must do token-expensive string manipulation to extract data like balance counts or dates.
Output schemas are not documented. Callers (LLMs) have no contract specifying what fields to expect, required vs optional fields, or data types. This violates the tool pattern and forces LLMs to infer structure from examples.
apply_leave modifies state (deducts leave balance, updates history) but the description does not explicitly state 'This tool modifies state' or explain the irreversible nature of the operation. Agents need to know which calls are safe to retry.
| Scored | Grade | Overall | Spec posture | Rubric |
|---|---|---|---|---|
| 2026-09-22 | F | 43 | 2026-07-28+ | v2 |
| 2026-03-09 | F | 39 | - | v1 |
leave_dates parameter in apply_leave has no format constraint or validation guidance. Descriptions should specify 'ISO 8601 dates (YYYY-MM-DD)' or include a regex pattern so LLMs know the expected format and validate before calling.
Error responses lack recovery guidance. 'Employee ID not found' should suggest 'Try listing all valid employee IDs' or similar. 'Insufficient leave balance' should state the required balance and current balance clearly for self-correction.
No confirmation step or dry-run mode for apply_leave, which is a destructive operation. An agent mistake will permanently deduct leave balance. Consider a separate 'dry_run' parameter or a 'confirm_leave_application' pattern.
Tool descriptions are generic and lack context. 'Check how many leave days are left for the employee' does not indicate the difference between get_leave_balance and get_leave_history or when to call each. Descriptions should guide tool selection.
employee_id parameter in all tools accepts only strings with no validation constraints. The in-memory mock uses 'E001', 'E002', but the parameter description does not specify valid format, range, or how LLMs should discover valid employee IDs.