MCP server for reading Excel files
The server defines 3 tools with complete JSON Schema input definitions and basic descriptions. All tools are explicitly registered via @server.list_tools() with proper schema structure. However, descriptions are minimal (under 200 chars baseline), parameters lack proper constraints and edge-case guidance, and there is no documented output schema. Error handling exists but provides generic messages without recovery guidance. The naming convention is reasonable (verb_noun), but parameter descriptions are sparse. Tools read from the file system with basic validation, but lack safeguards against path traversal and large file attacks.
Read content from Excel (xlsx) files
Read content from a specific sheet by index in Excel (xlsx) files. Reads first sheet (index 0) if sheet_index not provided.
Read content from a specific sheet by name in Excel (xlsx) files. Reads first sheet if sheet_name not provided.
Descriptions are minimal (34-45 characters). Current descriptions lack context for WHEN to use each tool and how they differ from each other.
Parameter descriptions are missing or incomplete. file_path lacks guidance on accepted formats (absolute vs relative, symlink handling). sheet_name and sheet_index descriptions state 'optional, defaults to...' but do not explain which tool to use when (read_excel reads all sheets; by_name/by_index read one). LLMs cannot disambiguate without explicit guidance.
No output schema documented. The tools return JSON with sheet names as keys and 2D arrays as values, but this structure is not declared in the tool definitions. LLMs cannot plan downstream operations without knowing the response shape.
| Scored | Grade | Overall | Spec posture | Rubric |
|---|---|---|---|---|
| 2026-09-22 | D | 50 | 2026-07-28+ | v2 |
| 2026-03-09 | F | 46 | - | v1 |
Error handling returns generic ValueError messages (e.g., 'Error reading Excel file: ...'). Per pattern, errors should guide recovery: 'Sheet not found. Available sheets: [list]. Try read_excel_by_sheet_name() with one of these names.' Currently, agents receive a string like 'Sheet "Sheet2" not found in workbook' with no actionable next step.
Path traversal vulnerability. The code converts file_path to absolute path and checks existence, but does not validate that the resolved path stays within an intended root directory. An LLM could pass '../../etc/passwd' and read arbitrary files. file_path should be constrained to a safe directory or schema should enforce a whitelist pattern.
No limit on file size or result size. openpyxl.load_workbook() will load entire file into memory. A multi-GB XLSX could exhaust memory. No pagination or truncation for large sheets.
sheet_index parameter lacks validation constraints in schema. 'minimum: 0' is specified, but no maximum. If index is out of range, error is 'Sheet index X is out of range' with no guidance. Schema should declare min/max bounds explicitly and include available count in error.
Tool naming could be more precise. 'read_excel' reads all sheets (result is a dict). 'read_excel_by_sheet_name' and 'read_excel_by_sheet_index' read one sheet. The naming does not make clear this semantic difference. Consider 'read_all_sheets_from_excel', 'read_single_sheet_by_name', 'read_single_sheet_by_index' for clarity.
No indication in descriptions which tool to use for common tasks. If user wants to 'read the first sheet', should they call read_excel (extra processing) or read_excel_by_sheet_index (clearer intent)? Descriptions should say 'Use this when you need...' to guide selection.