get_supported_formats
Lists supported Microsoft Office file formats and extensions for conversion to Markdown, including Word, Excel, and PowerPoint documents.
Instructions
Get list of all supported file formats.
Returns a dictionary of file types (word, excel, powerpoint) and their extensions.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/officereader_mcp/server.py:378-386 (handler)The main handler for the 'get_supported_formats' tool call. Returns a JSON response containing the supported formats dictionary and a list of all extensions.elif name == "get_supported_formats": return [TextContent( type="text", text=json.dumps({ "supported_formats": SUPPORTED_FORMATS, "all_extensions": get_supported_extensions(), }, ensure_ascii=False, indent=2) )]
- src/officereader_mcp/server.py:158-168 (registration)Registers the 'get_supported_formats' tool in the MCP server with its name, description, and empty input schema (no parameters required).Tool( name="get_supported_formats", description="""Get list of all supported file formats. Returns a dictionary of file types (word, excel, powerpoint) and their extensions.""", inputSchema={ "type": "object", "properties": {}, }, ), ]
- The input schema for the tool, which is an empty object since no parameters are needed.inputSchema={ "type": "object", "properties": {}, }, ),
- Core data structure defining the supported file formats by category, imported and used directly by the tool handler.SUPPORTED_FORMATS = { "word": [".docx", ".doc"], "excel": [".xlsx", ".xls"], "powerpoint": [".pptx", ".ppt"], }
- src/officereader_mcp/server.py:43-49 (helper)Helper function that flattens all supported extensions into a single list, used in the tool's response.def get_supported_extensions() -> list[str]: """Get list of all supported file extensions.""" extensions = [] for exts in SUPPORTED_FORMATS.values(): extensions.extend(exts) return extensions