Skip to main content
Glama

hny-mcp

by honeycombio
MIT License
2
36
  • Linux
  • Apple
analysis.ts1.56 kB
import { CardinalityClassification, NumericStatistics } from "../types/analysis.js"; /** * Determine cardinality classification based on the number of unique values * * @param uniqueCount - The number of unique values in the dataset * @returns A classification of the cardinality (low, medium, high, very high) */ export function getCardinalityClassification(uniqueCount: number): CardinalityClassification { if (uniqueCount <= 10) return 'low'; if (uniqueCount <= 100) return 'medium'; if (uniqueCount <= 1000) return 'high'; return 'very high'; } /** * Generate interpretation text for numeric statistics based on Honeycomb documentation */ export function generateInterpretation(stats: NumericStatistics, columnName: string): string { const interpretations = []; if (stats.avg !== undefined && stats.p95 !== undefined) { const ratio = stats.p95 / stats.avg; if (ratio > 3) { interpretations.push(`The P95 value is ${ratio.toFixed(1)}x higher than the average, suggesting significant outliers in ${columnName}.`); } } if (stats.min !== undefined && stats.max !== undefined) { const range = stats.max - stats.min; if (stats.avg !== undefined && range > stats.avg * 10) { interpretations.push(`The range (${range}) is very wide compared to the average (${stats.avg}), indicating high variability.`); } } if (interpretations.length === 0) { return `Standard distribution of ${columnName} values with expected statistical properties.`; } return interpretations.join(' '); }

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/honeycombio/honeycomb-mcp'

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