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

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

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()
        )
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full burden of behavioral disclosure. It effectively describes key behaviors: it lists files (read-only operation implied), specifies file formats and directory scanning constraints, and states the return format (full paths, sorted alphabetically). However, it doesn't mention error handling, permissions, or performance aspects like rate limits.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is highly concise and well-structured in two sentences: the first states the purpose and constraints, and the second specifies the return behavior. Every word adds value with zero waste, making it easy to parse and understand quickly.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's low complexity (single parameter, read-only operation), 100% schema coverage, and the presence of an output schema (implied by 'Has output schema: true'), the description is complete enough. It covers purpose, scope, file types, and return format, leaving detailed output structure to the output schema as appropriate.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema has 100% description coverage, clearly documenting the single 'directory' parameter. The description adds no additional parameter semantics beyond what the schema provides, such as examples or constraints on path formats. The baseline score of 3 is appropriate since the schema adequately covers parameter information.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the specific action ('List all spreadsheet files'), resource types ('.xlsx, .csv, .ods'), and scope ('in a directory, non-recursive'). It distinguishes itself from sibling tools like 'list_sheets' (which lists sheets within a workbook) and 'search_sheet' (which searches within sheet content).

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies usage by specifying the scope ('non-recursive') and file types, but does not explicitly state when to use this tool versus alternatives like 'list_sheets' or 'search_sheet'. No exclusions or prerequisites are mentioned, leaving some ambiguity about its context relative to siblings.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

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