Skip to main content
Glama

list_available_sql_tables

Retrieve a list of available Parquet files for SQL queries on Cryo MCP Server. Each entry includes file paths, dataset types, and metadata to use in SQL queries with query_sql().

Instructions

List all available parquet files that can be queried with SQL

USAGE NOTES:
- This function lists parquet files that have already been downloaded
- Each file can be queried using read_parquet('/path/to/file.parquet') in your SQL
- For each file, this returns the file path, dataset type, and other metadata
- Use these file paths in your SQL queries with query_sql()

Returns:
    List of available files and their metadata

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The MCP tool handler for 'list_available_sql_tables', decorated with @mcp.tool() for registration, which delegates to the core helper function in sql.py.
    @mcp.tool()
    def list_available_sql_tables() -> List[Dict[str, Any]]:
        """
        List all available parquet files that can be queried with SQL
        
        USAGE NOTES:
        - This function lists parquet files that have already been downloaded
        - Each file can be queried using read_parquet('/path/to/file.parquet') in your SQL
        - For each file, this returns the file path, dataset type, and other metadata
        - Use these file paths in your SQL queries with query_sql()
        
        Returns:
            List of available files and their metadata
        """
        from cryo_mcp.sql import list_available_tables
        return list_available_tables()
  • Core helper function that implements the logic: scans the data directory for parquet files, extracts metadata like name, path, size, block range, and returns list of dicts.
    def list_available_tables() -> List[Dict[str, Any]]:
        """List all available tables from downloaded data files."""
        data_dir = get_data_directory()
        
        # Find all parquet files in the data directory (including the latest subdirectory)
        parquet_files = list(data_dir.glob("**/*.parquet"))
        
        tables = []
        for file_path in parquet_files:
            # Extract dataset name from filename
            name = file_path.stem.split("__")[0]
            if "__" in file_path.stem:
                name = file_path.stem.split("__")[0]
            else:
                # Try to extract from other naming patterns
                name_match = re.match(r'([a-z_]+)_', file_path.stem)
                if name_match:
                    name = name_match.group(1)
                else:
                    name = file_path.stem
            
            # Get file stats
            stats = file_path.stat()
            
            # Try to extract block range from filename
            block_range = ""
            blocks_match = re.search(r'blocks__(\d+)_to_(\d+)', str(file_path))
            if blocks_match:
                block_range = f"{blocks_match.group(1)}:{blocks_match.group(2)}"
            
            tables.append({
                "name": name,
                "path": str(file_path),
                "size_bytes": stats.st_size,
                "modified": stats.st_mtime,
                "block_range": block_range,
                "is_latest": "latest" in str(file_path)
            })
        
        return tables
Behavior4/5

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

With no annotations provided, the description carries full burden and does well by explaining what gets returned (file path, dataset type, metadata), how to use the output (with read_parquet() and query_sql()), and the prerequisite that files must be 'already downloaded'. It doesn't mention performance characteristics or error conditions, but provides substantial behavioral context.

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 well-structured with clear sections, front-loads the core purpose, and every sentence adds value. The USAGE NOTES bullet points efficiently convey critical information without redundancy.

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?

For a zero-parameter tool with no annotations or output schema, the description provides excellent context about what the tool does, how to use its output, and relationships to other tools. It could mention error conditions or performance, but covers the essential usage context thoroughly.

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 tool has 0 parameters with 100% schema coverage, so the baseline is 4. The description appropriately doesn't discuss parameters since none exist, focusing instead on what the tool does and how to use its output.

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 verb 'list' and the resource 'parquet files that can be queried with SQL', specifying that these are files that have already been downloaded. It distinguishes from siblings like list_datasets by focusing specifically on SQL-queryable parquet files rather than datasets in general.

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

Usage Guidelines5/5

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

The USAGE NOTES section explicitly states when to use this tool (to get file paths for SQL queries) and how to use the output with query_sql(). It also distinguishes from alternatives by noting these are 'already downloaded' files, implying list_datasets might show available datasets that aren't yet downloaded.

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

Related 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/z80dev/cryo-mcp'

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