LLM-driven Excel Automation MCP Server built with FastAPI for intelligent data analysis, cleaning, pivot tables, formula generation, and natural language queries on Excel files
The server defines 5 tools with visible schemas and descriptions in app/mcp_server.py. All tools have names starting with action verbs (clean_, analyze_, create_, insert_, query_) and descriptions present. However, there are significant gaps: parameter descriptions are minimal (1-2 words per param), output schemas are not formally documented, error handling is inconsistent, and the server lacks important production patterns like validation guidance, output structure documentation, and detailed recovery hints. Parameter naming is adequate but could be more explicit (e.g., 'path' could be 'file_path', 'sheet' could be 'sheet_name'). The descriptions are between 10-100 chars, mostly in the acceptable range but lack WHEN-to-use context and prerequisite information. No tool annotations (readOnlyHint/destructiveHint) are present despite clear differences in tool safety (clean_excel and insert_excel_formula are destructive; others are read-only). Output responses include success/message fields and preview data, but no formal schema is declared. Error handling returns error messages but does not guide recovery or categorize retryability.
Analyze/Profile an Excel sheet for visualization
Clean an Excel sheet by removing empty rows and trimming columns
Create a pivot table from an Excel sheet and return a JSON preview. Supports cleaning column names.
Insert a formula into an Excel cell, supporting natural language intent.
Ask a natural language question about the Excel data
Parameter descriptions are minimal (1-2 words). 'path' just says 'Absolute path to the Excel file' but never explains format/example or any validation rules (must exist? must be .xlsx?). 'sheet' just says 'Name of the worksheet' with no guidance on what happens if the sheet doesn't exist. LLMs cannot infer constraints from names alone.
Output schema is not formally documented. Tools return dicts with 'success', 'message', and varying payload fields (e.g., 'profile', 'preview', 'chart_data', 'pivot_preview', 'formula'), but no JSON Schema or structured documentation tells the LLM what to expect. This forces the LLM to parse responses heuristically, risking missed fields.
Inferred effective spec: <=2025-11-25.
| Scored | Grade | Overall | Spec posture | Rubric |
|---|---|---|---|---|
| 2026-09-22 | D | 57 | <=2025-11-25 | v2 |
| 2026-03-09 | F | 47 | - | v1 |
Missing tool annotations. clean_excel and insert_excel_formula are destructive (modify state); analyze_data, create_pivot_table, query_data are read-only. No readOnlyHint or destructiveHint is declared. This prevents agents from reasoning about safety and side effects.
Error handling lacks recovery guidance. When a ValueError is caught (e.g., sheet not found, invalid column names), the response returns {'success': false, 'message': str(exc)}. The exception message is rarely actionable. No guidance like 'Call list_sheets() to see available worksheets' or 'Column names are case-sensitive' is provided.
Parameter naming could be more explicit. 'path' appears in all tools but never specifies format (.xlsx required? absolute vs relative?). 'sheet' in all tools, should this be 'sheet_name' for clarity? 'aggfunc' in create_pivot_table is abbreviated; should be 'aggregation_function'.
create_pivot_table description mentions 'Supports cleaning column names' but does not document what happens if column names are misspelled or if the LLM passes invalid column references. The LLM service attempts to normalize via LLM, but if normalization fails, no guidance is provided.
insert_excel_formula has optional parameters (formula and intent). The description says 'Must provide either formula or intent' but if both are missing, the error is caught and returned. However, the tool does not document what 'intent' format is expected (e.g., 'Average of column H', 'Sum all values in D2:D100?'). LLMs will guess.
query_data description says 'Ask a natural language question about the Excel data' but does not document what the LLM service does internally (generates Python code? Uses pandas? Calls an external AI?). If the query fails due to unsupported aggregations or syntax errors, the error message will not guide recovery.