Skip to main content
Glama
K02D

MCP Tabular Data Analysis Server

by K02D

list_data_files

Discover available CSV and SQLite files in your project data directory to begin analyzing tabular datasets with the MCP Tabular Data Analysis Server.

Instructions

List available data files in the project data directory.

Args:
    data_dir: Relative path to data directory (default: "data")

Returns:
    Dictionary containing list of available CSV and SQLite files

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
data_dirNodata

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The handler function for the 'list_data_files' MCP tool. It scans the specified data directory for CSV and SQLite files, collects metadata (size, relative path), peeks at CSV column headers, and returns a structured list separated by file type.
    def list_data_files(data_dir: str = "data") -> dict[str, Any]:
        """
        List available data files in the project data directory.
        
        Args:
            data_dir: Relative path to data directory (default: "data")
        
        Returns:
            Dictionary containing list of available CSV and SQLite files
        """
        data_path = _resolve_path(data_dir)
        
        if not data_path.exists():
            return {
                "data_directory": str(data_path),
                "exists": False,
                "files": []
            }
        
        csv_files = []
        db_files = []
        
        for file_path in sorted(data_path.iterdir()):
            if file_path.is_file():
                suffix = file_path.suffix.lower()
                file_info = {
                    "name": file_path.name,
                    "path": str(file_path.relative_to(_PROJECT_ROOT)),
                    "size_bytes": file_path.stat().st_size,
                }
                
                if suffix == ".csv":
                    # Try to get basic info about CSV
                    try:
                        df = pd.read_csv(str(file_path), nrows=0)
                        file_info["columns"] = df.columns.tolist()
                        file_info["column_count"] = len(df.columns)
                    except Exception:
                        pass
                    csv_files.append(file_info)
                elif suffix in (".db", ".sqlite", ".sqlite3"):
                    db_files.append(file_info)
        
        return {
            "data_directory": str(data_path.relative_to(_PROJECT_ROOT)),
            "absolute_path": str(data_path),
            "csv_files": csv_files,
            "sqlite_files": db_files,
            "total_files": len(csv_files) + len(db_files),
        }
Behavior2/5

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

No annotations are provided, so the description carries the full burden of behavioral disclosure. It states the tool lists files and returns a dictionary, but lacks details on permissions, rate limits, error handling, or whether it's read-only (implied but not explicit). For a tool with zero annotation coverage, this is a significant gap in transparency about its operational behavior.

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 efficiently structured and front-loaded: the first sentence states the core purpose, followed by clear 'Args' and 'Returns' sections. Every sentence earns its place by providing necessary information without redundancy, making it easy to scan and understand quickly.

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

Completeness4/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 (one optional parameter) and the presence of an output schema (which handles return value documentation), the description is reasonably complete. It covers the purpose, parameter semantics, and return type adequately. However, it lacks usage guidelines and behavioral details, which are minor gaps in this simple context.

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

Parameters4/5

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

The description adds meaningful context for the single parameter: it explains that 'data_dir' is a 'Relative path to data directory' with a default of 'data', which clarifies its purpose beyond the schema's basic type and title. Since schema description coverage is 0%, the description compensates well by providing essential semantic information, though it could specify path format or constraints.

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

Purpose4/5

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

The description clearly states the tool's purpose: 'List available data files in the project data directory.' It specifies the verb ('List') and resource ('available data files'), and distinguishes it from siblings like 'list_tables' by focusing on files rather than database tables. However, it doesn't explicitly differentiate from other file-related operations that might exist in a broader context.

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

Usage Guidelines2/5

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

The description provides no guidance on when to use this tool versus alternatives. It doesn't mention when this tool is appropriate compared to siblings like 'list_tables' (for database contents) or 'describe_dataset' (for metadata), nor does it specify prerequisites or exclusions. The only contextual hint is the default parameter value, which is insufficient for usage decisions.

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/K02D/mcp-tabular'

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