Skip to main content
Glama

FastMCP Supply Chain Optimizer

by ANSH-RIYAL
survey_analyzer_tools.py•1.54 kB
import pandas as pd from collections import Counter class SurveyAnalyzerTools: def extract_themes(self, responses: list) -> dict: """ Extract common themes from survey responses (simple keyword frequency). """ keywords = ['usability', 'performance', 'price', 'support'] found = [] for response in responses: for kw in keywords: if kw in response.lower(): found.append(kw) theme_counts = Counter(found) themes = [theme for theme, count in theme_counts.most_common()] return {'themes': themes} def compute_frequencies(self, data: pd.DataFrame) -> dict: """ Compute response frequencies and confidence intervals (basic stats). """ if 'satisfaction' in data.columns: satisfied = data['satisfaction'].sum() total = len(data) rate = satisfied / total if total else 0 # 95% CI for proportion import math ci = 1.96 * ((rate * (1 - rate)) / total) ** 0.5 if total else 0 return {'satisfaction_rate': round(rate, 2), 'ci': round(ci, 2)} return {'satisfaction_rate': None, 'ci': None} def generate_summary_report(self, insights: dict) -> dict: """ Generate a summary report from insights. """ report = f"Survey Summary:\nThemes: {insights.get('themes', [])}\nSatisfaction Rate: {insights.get('satisfaction_rate', 'N/A')}" return {'report': report}

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/ANSH-RIYAL/FastMCP'

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