import pandas as pd
from pathlib import Path
DATA_DIR = Path(__file__).resolve().parent.parent / "data"
def read_csv_summary(filename: str) -> str:
"""
Read a CSV file and return a simple summary.
Args:
filename (str): Name of the CSV file
Returns:
str: A string describing the file's concents.
"""
file_path = DATA_DIR / filename
if not file_path.exists():
return f"File {filename} does not exist."
df = pd.read_csv(file_path)
return f"CSV file '{filename}' has {len(df)} rows and {len(df.columns)} columns."
def read_parquet_summary(filename: str) -> str:
"""
Read a Parquet file and return a simple summary.
Args:
filename (str): Name of the Parquet file
Returns:
str: A string describing the file's contents.
"""
file_path = DATA_DIR / filename
if not file_path.exists():
return f"File {filename} does not exist."
df = pd.read_parquet(file_path)
return f"Parquet file '{filename}' has {len(df)} rows and {len(df.columns)} columns."
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/mlstudios-ai/mcp-mix-server'
If you have feedback or need assistance with the MCP directory API, please join our Discord server