Skip to main content
Glama

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
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • 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)
        )]
  • 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"],
    }
  • 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

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/Asunainlove/OfficeReader-MCP'

If you have feedback or need assistance with the MCP directory API, please join our Discord server