Skip to main content
Glama
marekrost

mcp-server-spreadsheet

list_workbooks

Scan a directory to find and list spreadsheet files (XLSX, CSV, ODS) with their full paths in alphabetical order.

Instructions

List all spreadsheet files (.xlsx, .csv, .ods) in a directory (non-recursive).

Returns the full path of each file found, sorted alphabetically.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
directoryYesAbsolute or relative path to the directory to scan

Implementation Reference

  • Implementation of the list_workbooks tool which scans a directory for supported spreadsheet files.
    def list_workbooks(
        directory: Annotated[str, Field(description="Absolute or relative path to the directory to scan")],
    ) -> list[str]:
        """List all spreadsheet files (.xlsx, .csv, .ods) in a directory (non-recursive).
    
        Returns the full path of each file found, sorted alphabetically.
        """
        d = Path(directory)
        if not d.is_dir():
            raise ValueError(f"Not a directory: {directory}")
        return sorted(
            str(f)
            for f in d.iterdir()
            if f.suffix.lower() in SUPPORTED_EXTENSIONS and f.is_file()
        )

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/marekrost/mcp-server-spreadsheet'

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