MCP server for reading and working with Excel files using pandas and openpyxl
Single tool 'read_excel' has adequate naming and a complete docstring, but the schema is missing critical constraints, parameter descriptions are generic, and output documentation is absent. The tool lacks error guidance for recovery, has no input validation against path traversal, and the schema shows sheet_name as a string with no enum or format constraints despite the docstring mentioning it can be 'Name or index'. Output type is pd.DataFrame with no structured schema exposed to the LLM, the agent cannot know what fields to extract or how to chain downstream calls.
Read an Excel file and return its content as a pandas DataFrame. Args: file_path (str): Path to the Excel file. sheet_name (str, optional): Name or index of the sheet to read. If None, reads the first sheet by default. Returns: pd.DataFrame: DataFrame containing the Excel sheet data. Raises: FileNotFoundError: If the specified file does not exist. ValueError: If the specified sheet does not exist in the Excel file.
Output schema not documented. Tool returns pd.DataFrame but LLM has no visibility into the structure. Agent cannot plan downstream extractions or chain calls.
sheet_name parameter accepts string but docstring says 'Name or index', should be constrained with enum (list of valid sheet names) or regex pattern. Currently free-form string invites hallucinated sheet names.
No input validation for path traversal. Agent could pass '../../../etc/passwd' or absolute paths outside safe directories. Missing sanitization for file_path parameter.
Error messages in code (FileNotFoundError, ValueError) are not converted to recovery guidance. LLM sees 'Sheet not found' but receives no suggestion on how to discover valid sheets or retry.
| Scored | Grade | Overall | Spec posture | Rubric |
|---|---|---|---|---|
| 2026-09-22 | F | 45 | 2026-07-28+ | v2 |
| 2026-03-09 | D | 51 | - | v1 |
Parameter descriptions in schema are incomplete. file_path lacks format hint ('absolute or relative path'), sheet_name lacks constraint explanation ('sheet index must be 0-based integer if numeric').