Skip to main content
Glama
mlei06

Elasticsearch MCP (VSee Fork)

by mlei06

Elasticsearch MCP (VSee Fork)

Modified MCP server with hardcoded schemas matching VSee's Elasticsearch indexes. Specialized analytics tools optimized for stats- indices.*

npm version TypeScript Elasticsearch License: MIT

elasticsearch-mcp-vsee is a modified Model Context Protocol (MCP) server that provides specialized analytics tools for Elasticsearch clusters, optimized for VSee's stats-* indices. This fork features hardcoded schemas and field names that match VSee's specific Elasticsearch index structure, enabling specialized tools for account/group analytics, visit trends, platform breakdowns, and rating distributions. Built with TypeScript and optimized for Elastic Cloud environments, it offers comprehensive analytics capabilities with enterprise-grade security features.

πŸš€ Features

  • πŸ” Secure by Design: Input validation, script sanitization, injection prevention

  • ☁️ Elastic Cloud Ready: Native support for cloud ID and API key authentication

  • ⚑ High Performance: Connection pooling, optimized query execution, efficient aggregations

  • πŸ› οΈ Comprehensive Tools: 11 specialized tools for analytics, summaries, and data exploration

  • πŸ“Š Advanced Querying: Full Elasticsearch DSL support with aggregations and highlighting

  • πŸ” Smart Validation: Zod-based schemas with security-first validation

  • πŸ“ Full TypeScript: Complete type safety with strict null checks

🎯 Purpose

This MCP server is designed for VSee's Open WebUI deployment to provide specialized analytics tools for querying VSee's Elasticsearch stats-* indices. It integrates with VSee's Open WebUI infrastructure via MCPO (MCP OpenAPI bridge) to expose Elasticsearch analytics capabilities to LLMs.

πŸ“¦ Usage with VSee's Open WebUI Deployment

This MCP server is automatically loaded by VSee's Open WebUI deployment through the MCP configuration. It connects to VSee's Elasticsearch deployment to provide analytics on visit statistics, account/group metrics, platform breakdowns, and more.

Configuration

The MCP server is configured in vsee/mcp/config.json:

{
  "mcpServers": {
    "elasticsearch": {
      "command": "npx",
      "args": ["-y", "elasticsearch-mcp-vsee"],
      "env": {
        "ELASTIC_NODE": "https://omtm.es.us-east-1.aws.found.io",
        "ELASTIC_USERNAME": "your-username",
        "ELASTIC_PASSWORD": "your-password",
        "NODE_TLS_REJECT_UNAUTHORIZED": "0"
      }
    }
  }
}

The Open WebUI deployment automatically loads this configuration and starts the MCP server via MCPO, making all 11 tools available to the LLM for querying Elasticsearch data.

πŸ”„ Updating and Publishing

Making Changes

  1. Develop locally: Make changes to the code in elasticsearch-mcp/

  2. Test your changes: Use npm run test:tools to test against your Elasticsearch instance

  3. Build: Run npm run build to compile TypeScript

  4. Publish: Publish to npm with npm publish --access public

    • Make sure to increment the version in package.json first

Updating VSee's Deployment

After publishing a new version to npm:

  1. Update vsee/mcp/config.json: Change the package version in the args array:

    {
      "mcpServers": {
        "elasticsearch": {
          "command": "npx",
          "args": ["-y", "elasticsearch-mcp-vsee@0.5.0"],  // Update version here
          "env": {
            ...
          }
        }
      }
    }
  2. Restart the MCPO service: The MCPO container will automatically download and use the new version on restart:

    docker compose -f docker-compose.vsee.yaml restart mcpo
  3. Verify: Check that the new version is loaded by examining the MCPO logs or testing the tools in Open WebUI.

Note: You can also use @latest to always pull the latest version, but specifying a version number is recommended for production stability.

πŸ› οΈ Available Tools

Tool

Description

Use Cases

get_index_fields

Discover index fields and types

Schema exploration, field discovery

top_change

Find top accounts or groups with highest visit increase/decrease

Trend analysis, account/group monitoring

get_subscription_breakdown

Compare subscription tiers with metrics per tier

Subscription-tier analysis and comparisons

get_platform_breakdown

Platform or platform version breakdown (provider/patient, platform/version)

Platform adoption, device preferences, version analysis

get_rating_distribution

Rating histograms with statistics

Satisfaction analysis

get_visit_trends

Time series visit trends (daily/weekly/monthly)

Trend visualization

get_usage_profile

Comprehensive metrics summary with flexible filtering and grouping

Multi-dimensional analysis and comparisons

get_usage_leaderboard

Ranked leaderboard of accounts/groups/platforms

High-usage entities, outliers

πŸ“‹ Tool Examples

Get Account Summary

{
  "tool": "get_account_summary",
  "arguments": {
    "account": "example-customer",
    "startDate": "now-1y",
    "endDate": "now"
  }
}

Get Top Accounts by Growth

{
  "tool": "top_change",
  "arguments": {
    "groupBy": "account",
    "direction": "increase",
    "topN": 10,
    "currentPeriodDays": 30,
    "previousPeriodDays": 30
  }
}

Get Platform Breakdown

{
  "tool": "get_platform_breakdown",
  "arguments": {
    "role": "provider",
    "breakdownType": "version",
    "topN": 10,
    "startDate": "now-30d",
    "endDate": "now"
  }
}
{
  "tool": "get_visit_trends",
  "arguments": {
    "interval": "daily",
    "startDate": "now-30d",
    "endDate": "now",
    "groupBy": "subscription"
  }
}

βš™οΈ Configuration

Environment Variables

The MCP server reads configuration from environment variables. These are set in vsee/mcp/config.json under the env section:

Variable

Description

Required

Example

ELASTIC_NODE

Elasticsearch URL

Yes

https://omtm.es.us-east-1.aws.found.io

ELASTIC_USERNAME

Basic auth username

Yes

your-username

ELASTIC_PASSWORD

Basic auth password

Yes

your-password

NODE_TLS_REJECT_UNAUTHORIZED

Disable TLS verification (for self-signed certs)

No

"0"

Alternative: Elastic Cloud Authentication

If using Elastic Cloud with cloud ID and API key:

Variable

Description

Required

ELASTIC_CLOUD_ID

Elastic Cloud deployment ID

Yes*

ELASTIC_API_KEY

Elasticsearch API key

Yes*

*Either ELASTIC_CLOUD_ID + ELASTIC_API_KEY OR ELASTIC_NODE + ELASTIC_USERNAME + ELASTIC_PASSWORD is required

πŸ”’ Security Features

Input Validation

  • Zod Schemas: Strict type validation for all inputs

  • Field Name Validation: Prevents reserved field usage

  • Size Limits: Document size, array length, string length limits

  • Depth Validation: Prevents deeply nested objects/queries

Script Security

  • Script Sanitization: Blocks dangerous script patterns

  • Parameter Validation: Validates script parameters

  • Execution Limits: Prevents resource exhaustion

Query Security

  • Injection Prevention: Sanitizes and validates all queries

  • Script Query Blocking: Prevents script-based queries in sensitive operations

  • Rate Limiting: Protects against abuse

Data Protection

  • Credential Masking: Never logs sensitive information

  • Secure Connections: TLS/SSL support

  • Access Control: Validates permissions before operations

πŸ—οΈ Architecture

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”    β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”    β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚   MCP Client    │◄──►│Elasticsearch MCP│◄──►│  Elasticsearch  β”‚
β”‚  (Claude, etc.) β”‚    β”‚     Server      β”‚    β”‚    Cluster      β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜    β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜    β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                              β”‚
                       β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
                       β”‚   Tools     β”‚
                       β”‚             β”‚
                       β”‚ β€’ search    β”‚
                       β”‚ β€’ fields    β”‚
                       β”‚ β€’ summaries β”‚
                       β”‚ β€’ trends    β”‚
                       β”‚ β€’ analytics β”‚
                       β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

πŸ“Š Performance

Benchmarks

  • Search: <500ms average response time

  • Aggregations: Optimized for large-scale analytics

  • Memory Usage: <100MB for typical operations

  • Concurrent Requests: Up to 10 simultaneous operations

Optimization Features

  • Connection Pooling: Reuses Elasticsearch connections

  • Optimized Queries: Efficient aggregation pipelines

  • Smart Caching: Reduced redundant queries

  • Health Monitoring: Automatic reconnection on failures

πŸ”§ Development

Setup Development Environment

# Install dependencies
npm install

# Set up environment variables
export ELASTIC_NODE="https://your-elasticsearch-url"
export ELASTIC_USERNAME="your-username"
export ELASTIC_PASSWORD="your-password"
export NODE_TLS_REJECT_UNAUTHORIZED="0"  # If needed for self-signed certs

# Run in development mode
npm run dev

# Test tools against live Elasticsearch
npm run test:tools

# Build for production
npm run build

# Publish new version (after incrementing version in package.json)
npm publish --access public

Project Structure

elasticsearch-mcp/
β”œβ”€β”€ src/
β”‚   β”œβ”€β”€ tools/           # MCP tool implementations
β”‚   β”œβ”€β”€ elasticsearch/   # ES client and connection management
β”‚   β”œβ”€β”€ validation/      # Input validation schemas
β”‚   β”œβ”€β”€ errors/          # Error handling utilities
β”‚   β”œβ”€β”€ config.ts        # Configuration management
β”‚   β”œβ”€β”€ logger.ts        # Structured logging
β”‚   └── server.ts        # Main MCP server
β”œβ”€β”€ tests/               # Test suite
└── build/               # Compiled output

πŸ“„ License

This project is licensed under the MIT License - see the LICENSE file for details.

🏷️ Version History

  • v0.5.17 - Refined analytics tools: simplified metrics, removed unused ratings/duration fields from specific tools

  • v0.5.0 - Added find_entities_by_metric tool with multi-metric filtering support, updated default limits

  • v0.4.0 - Tool consolidation: merged 14 tools into 11 specialized analytics tools

  • v0.3.0 - Specialized analytics tools for stats-* indices

  • Full changelog: CHANGELOG.md


Built for VSee by VSee

Available Tools

8 tools
find_entities_by_metricA

Find groups or accounts filtered by metrics. Supports single metric (legacy) or multiple metrics (recommended). Available metrics: account_count (groups only), visit_count, provider_rating, patient_rating, avg_call_duration, unique_providers, unique_patients, provider_rating_count, patient_rating_count. Can filter accounts by group. Returns entities matching ALL criteria with their metric values.

ParametersJSON Schema
NameRequiredDescriptionDefault
entityTypeYesType of entity to find: "group" to find groups, "account" to find accounts
metricNoSingle metric to filter by (use metrics array for multiple filters). Available: account_count (groups only), visit_count, provider_rating, patient_rating, avg_call_duration, unique_providers, unique_patients, provider_rating_count, patient_rating_count
minNoMinimum value when using single metric (use metrics array for multiple filters)
maxNoMaximum value when using single metric (use metrics array for multiple filters)
metricsNoArray of metric filters. Use this for filtering by multiple metrics simultaneously. Each filter requires metric and at least one of min/max.
startDateNoStart date in ISO format (YYYY-MM-DD) or date math (e.g., "now-30d", "now-1y"). Defaults to "now-1y"
endDateNoEnd date in ISO format (YYYY-MM-DD) or date math (e.g., "now"). Defaults to "now"
subscriptionNoOptional subscription tier to filter by
groupNoOptional group name to filter by (only valid when entityType="account")
limitNoMaximum number of results to return (default: 10, max: 500). Recommended: do not set over 10.

TDQS

A3.8/5.0
Behavior3/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It does well by specifying that it 'Returns entities matching ALL criteria with their metric values,' clarifying the filtering logic. However, it lacks details on performance implications (e.g., rate limits, latency), error handling, or pagination beyond the 'limit' parameter, which is a gap for a tool with 10 parameters and no output schema.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is appropriately sized and front-loaded, starting with the core purpose and key usage notes. It efficiently lists metrics and clarifies filtering behavior. However, the metric list is lengthy and could be summarized more concisely, and the sentence structure is slightly dense, making it less than perfectly streamlined.

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

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's complexity (10 parameters, no annotations, no output schema), the description is adequate but has gaps. It covers purpose, metrics, and filtering logic well, but lacks details on return format, error cases, or performance considerations. Without an output schema, the description should ideally hint at the response structure, which it does not, leaving the agent uncertain about what to expect.

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

Parameters3/5

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

Schema description coverage is 100%, so the schema already documents all parameters thoroughly. The description adds some value by listing available metrics and explaining the single vs. multiple metric usage, but it does not provide additional semantic context beyond what the schema offers (e.g., explaining 'account_count (groups only)' is already in the schema). Baseline 3 is appropriate as the schema does the heavy lifting.

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 tool's purpose: 'Find groups or accounts filtered by metrics.' It specifies the verb ('find'), resource ('groups or accounts'), and filtering mechanism ('by metrics'). It distinguishes itself from siblings by focusing on metric-based filtering rather than breakdowns, trends, or summaries.

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

Usage Guidelines4/5

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

The description provides clear context for usage: it explains when to use single vs. multiple metrics ('Supports single metric (legacy) or multiple metrics (recommended)'), lists available metrics, and notes that accounts can be filtered by group. However, it does not explicitly state when to use this tool versus sibling alternatives like 'get_usage_summary' or 'top_change', which might offer overlapping functionality.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

get_index_fieldsA

Get all fields from an Elasticsearch index with optional filtering by field name and type. Use this tool when you need to discover available fields, their types, and correct field names before constructing queries. This is especially useful when unsure about field names or when looking for fields with specific types (e.g., keyword fields for exact matches or text fields for full-text search). ⚠️ IMPORTANT: Do NOT specify the index parameter unless the user explicitly requests fields from a different index. The tool defaults to "stats-*" which covers all standard indices. Only include the index parameter if the user specifically mentions a different index name.

ParametersJSON Schema
NameRequiredDescriptionDefault
indexNoIndex name or pattern (supports wildcards like stats-*). Defaults to "stats-*" if not specified. Only specify if you need fields from a different index.stats-*
fieldFilterNoFilter fields by name (case-insensitive partial match)
typeFilterNoFilter fields by type (e.g., "text", "keyword", "long", "date")
includeNestedNoInclude nested fields in the results

TDQS

A4.6/5.0
Behavior4/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It does well by explaining the default index behavior ('stats-*'), the filtering capabilities, and the purpose of field discovery. However, it doesn't mention potential rate limits, authentication requirements, or what the output format looks like (though there's no output schema).

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 with clear front-loading of the core purpose, followed by usage guidelines and important warnings. Every sentence earns its place by providing specific guidance or context without redundancy. The warning section is appropriately highlighted with emoji and capitalization.

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 tool with 4 parameters, 100% schema coverage, and no output schema, the description does well by explaining the tool's purpose, usage context, and behavioral constraints. However, it doesn't describe what the return values look like (field format, structure, or examples), which would be helpful given the lack of output schema.

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?

Schema description coverage is 100%, so the baseline is 3. The description adds value by explaining the purpose of field filtering ('optional filtering by field name and type'), providing context about when to use the index parameter (only when explicitly requested), and giving examples of type filters ('keyword fields for exact matches or text fields for full-text search').

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 ('Get all fields') and resource ('from an Elasticsearch index'), specifies the optional filtering capabilities, and distinguishes this tool from its siblings by focusing on field discovery rather than data retrieval or analysis. It explicitly mentions discovering available fields, their types, and correct field names.

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 description provides explicit guidance on when to use this tool ('when you need to discover available fields... before constructing queries') and when not to use it (⚠️ IMPORTANT warning about not specifying the index parameter unless explicitly requested). It also explains the specific use cases like being unsure about field names or looking for fields with specific types.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

get_platform_breakdownA

Get breakdown of top N platforms or platform versions by usage over a time period, can optionally be filtered by account or group. Supports both provider and patient roles. Returns top N items (default 10) plus "Other" category if needed, with metrics per item including visit counts, unique accounts/providers/patients, ratings, and call duration.

ParametersJSON Schema
NameRequiredDescriptionDefault
roleYesRole: "provider" for provider platforms/versions, "patient" for patient platforms/versions
breakdownTypeYesBreakdown type: "platform" for platform breakdown (Web/iOS/Android), "version" for platform version breakdown
topNNoNumber of top items to return (default: 10, max: 100). Recommended: do not set over 10.
startDateNoStart date. Format: ISO date (YYYY-MM-DD) or date math (now-30d, now-1y). Default: now-30d.
endDateNoEnd date. Format: ISO date (YYYY-MM-DD) or date math (now). Default: now.
accountNoOptional account name to filter data to
groupNoOptional group name to filter data to

TDQS

A3.6/5.0
Behavior3/5

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

With no annotations provided, the description carries the full burden and partially discloses behavior by mentioning optional filtering, default values, and return metrics, but lacks details on rate limits, authentication needs, or error handling, which are important for a tool with 7 parameters.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is appropriately sized and front-loaded, starting with the core purpose and then detailing optional features and return values in a single, efficient sentence with no redundant information.

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

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's complexity with 7 parameters and no annotations or output schema, the description is moderately complete but could better address behavioral aspects like data freshness or limitations, though it adequately covers purpose and basic usage.

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

Parameters3/5

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

Schema description coverage is 100%, so the schema already documents all parameters thoroughly. The description adds marginal value by mentioning optional filtering and default topN behavior, but does not provide significant additional semantics beyond what the schema specifies.

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 tool's purpose with specific verbs ('Get breakdown') and resources ('top N platforms or platform versions by usage'), distinguishing it from siblings like get_usage_summary or get_visit_trends by focusing on platform/version breakdowns rather than general usage or trends.

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

Usage Guidelines3/5

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

The description implies usage context by mentioning filtering options and role support, but does not explicitly state when to use this tool versus alternatives like get_subscription_breakdown or get_rating_distribution, leaving the agent to infer based on the breakdown focus.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

get_rating_distributionA

Get rating distribution (histogram) for provider and/or patient ratings over a time period. Returns rating buckets with counts and percentages, plus statistics (average, min, max, total count). Supports grouping by subscription, account, or group for comparative analysis.

ParametersJSON Schema
NameRequiredDescriptionDefault
ratingTypeYesType of rating to analyze: "provider", "patient", or "both"
bucketSizeNoRating bucket size (default: 1, e.g., 1 = 1-2, 2-3, 3-4, etc.)
startDateNoStart date. Format: ISO date (YYYY-MM-DD) or date math (now-30d, now-1y). Default: now-30d.
endDateNoEnd date. Format: ISO date (YYYY-MM-DD) or date math (now). Default: now.
accountNoOptional account name to filter by
groupNoOptional group name to filter by
subscriptionNoOptional subscription tier to filter by
groupByNoOptional grouping dimension (default: none). When set, returns separate distributions for each group value.none

TDQS

A4/5.0
Behavior3/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It does well by describing the return format ('rating buckets with counts and percentages, plus statistics') and grouping capabilities. However, it doesn't mention important behavioral aspects like whether this is a read-only operation, potential rate limits, authentication requirements, or what happens with invalid parameters. The description adds useful context but leaves gaps in behavioral transparency.

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 in two sentences that front-load the core functionality and follow with supporting details. Every phrase earns its place by either specifying the tool's purpose, describing the output format, or explaining grouping capabilities. There's no wasted language or 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?

Given the tool's moderate complexity (8 parameters, no output schema, no annotations), the description does well by covering the core functionality, output format, and grouping capabilities. However, it could be more complete by mentioning the absence of an output schema (users must infer the return structure from the description) and providing more guidance on when this tool is most appropriate versus sibling tools.

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?

With 100% schema description coverage, the baseline is 3. The description adds value by explaining the grouping capability ('Supports grouping by subscription, account, or group for comparative analysis') and clarifying the statistical output ('average, min, max, total count'), which helps users understand the tool's capabilities beyond individual parameter documentation. However, it doesn't provide additional syntax or format details for parameters beyond what's in the schema.

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 tool's purpose with specific verbs ('Get rating distribution', 'Returns rating buckets with counts and percentages, plus statistics') and identifies the resources involved ('provider and/or patient ratings'). It distinguishes this tool from siblings by focusing specifically on rating distribution analysis rather than entity finding, field indexing, or other breakdown types.

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

Usage Guidelines3/5

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

The description implies usage context through phrases like 'over a time period' and 'for comparative analysis', suggesting this tool should be used when temporal analysis or grouped comparisons are needed. However, it doesn't explicitly state when to use this tool versus alternatives like 'get_usage_summary' or 'get_visit_trends', nor does it mention any exclusions or prerequisites for usage.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

get_subscription_breakdownA

Compare subscription tiers (Enterprise, Premium, FVC, BVC, Plus) across a time period. Always returns metrics grouped by subscription tier with per-tier breakdown (visits, accounts, providers, patients, ratings, call duration) plus totals.

ParametersJSON Schema
NameRequiredDescriptionDefault
startDateNoStart date in ISO format (YYYY-MM-DD) or date math (e.g., "now-30d", "now-1y"). Defaults to "now-30d"
endDateNoEnd date in ISO format (YYYY-MM-DD) or date math (e.g., "now"). Defaults to "now"

TDQS

A3.6/5.0
Behavior3/5

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

With no annotations, the description carries the full burden. It discloses the tool's behavior by specifying it 'Always returns metrics grouped by subscription tier' with detailed breakdowns, but lacks information on permissions, rate limits, error handling, or data freshness. It adequately describes the output structure but misses operational constraints.

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 front-loaded with the core purpose in the first sentence, followed by essential output details. Every sentence adds value without redundancy, making it efficient and well-structured for quick understanding.

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 moderate complexity (2 parameters, no output schema, no annotations), the description is mostly complete. It clearly states the purpose, output structure, and time-based operation. However, it lacks details on error cases or example usage, which could enhance completeness for a reporting tool.

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

Parameters3/5

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

Schema description coverage is 100%, so the schema fully documents the two parameters (startDate, endDate) with formats and defaults. The description adds no additional parameter semantics beyond implying a time period, which is already covered by the schema. Baseline 3 is appropriate as the schema handles parameter documentation.

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 specific action ('Compare subscription tiers') and resource ('Enterprise, Premium, FVC, BVC, Plus') with detailed scope ('across a time period'). It distinguishes from siblings by focusing on subscription-tier comparison rather than entities, fields, platform breakdowns, ratings, usage summaries, visit trends, or top changes.

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?

No guidance is provided on when to use this tool versus alternatives like 'get_platform_breakdown' or 'get_usage_summary', nor any prerequisites or exclusions. The description implies usage for time-period comparisons but lacks explicit context for tool selection among siblings.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

get_usage_summaryB

Get usage summary for a time period, can optionally be filtered by account, group, or subscription. Returns visits, unique counts, ratings, call duration plus distribution breakdowns (subscription tiers, provider platforms, patient platforms).

ParametersJSON Schema
NameRequiredDescriptionDefault
startDateNoStart date. Format: ISO date (YYYY-MM-DD) or date math (now-30d, now-1y). Default: now-30d.
endDateNoEnd date. Format: ISO date (YYYY-MM-DD) or date math (now). Default: now.
accountNoFILTER: Optional account name to filter data to
groupNoFILTER: Optional group name to filter data to
subscriptionNoFILTER: Optional subscription tier to filter data to
groupByNoGROUP: Dimension to split/group results by (e.g., "account" to see summaries per account, "group" to see per group)none

TDQS

B3.2/5.0
Behavior2/5

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

With no annotations provided, the description carries full burden but offers limited behavioral insight. It mentions the tool 'returns' specific data types (visits, counts, etc.) and breakdowns, indicating a read-only operation, but doesn't disclose critical traits like rate limits, authentication needs, data freshness, or error handling. For a tool with 6 parameters and no annotations, this is a significant gap in transparency.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is efficiently structured in two sentences: the first states the core purpose and filters, the second details return values. It's front-loaded with key information and avoids redundancy. However, it could be slightly more concise by integrating the filter and return details more seamlessly, but overall it earns its place with zero waste.

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

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given 6 parameters with full schema coverage but no annotations or output schema, the description is moderately complete. It covers the tool's purpose and return data, which helps compensate for the lack of output schema. However, for a read operation with multiple filters and grouping options, it should ideally mention output structure implications (e.g., how grouping affects the summary format) to be fully adequate.

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

Parameters3/5

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

Schema description coverage is 100%, so the schema fully documents all 6 parameters with details like formats, defaults, and enums. The description adds minimal value beyond the schema by listing filter options (account, group, subscription) and mentioning grouping, but doesn't explain parameter interactions or semantics (e.g., how 'groupBy' affects output). Baseline 3 is appropriate as the schema does the heavy lifting.

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: 'Get usage summary for a time period' with specific metrics like visits, unique counts, ratings, and call duration. It distinguishes itself from siblings like 'get_visit_trends' or 'get_rating_distribution' by offering a comprehensive summary rather than focused breakdowns. However, it doesn't explicitly contrast with all siblings (e.g., 'get_platform_breakdown'), keeping it from a perfect 5.

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

Usage Guidelines3/5

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

The description implies usage context by mentioning optional filters (account, group, subscription) and grouping, suggesting it's for aggregated analytics. However, it lacks explicit guidance on when to use this tool versus alternatives like 'get_visit_trends' for time-series data or 'get_subscription_breakdown' for detailed tier analysis. No exclusions or prerequisites are stated, leaving usage somewhat open-ended.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

top_changeA

Find top N accounts or groups with highest visit/usage increase or decrease between two consecutive time periods. Returns items ranked by change with current period count, previous period count, absolute change, and percentage change. The previous period is automatically calculated to match the duration of the current period, ending where the current period starts. Supports filtering by subscription tier.

ParametersJSON Schema
NameRequiredDescriptionDefault
groupByYesGroup by: "account" to find top accounts by visit change, "group" to find top groups by visit change
directionYesDirection: "increase" for highest growth, "decrease" for highest decline
topNNoNumber of top items to return (default: 5, max: 50)
startDateNoStart date for current period in ISO format (YYYY-MM-DD) or date math (e.g., "now-30d", "now-1y"). Defaults to "now-30d"
endDateNoEnd date for current period in ISO format (YYYY-MM-DD) or date math (e.g., "now"). Defaults to "now"
subscriptionNoOptional subscription tier to filter by

TDQS

A4/5.0
Behavior4/5

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

With no annotations provided, the description carries the full burden and does well by disclosing key behaviors: it explains how the previous period is automatically calculated, describes the return format (ranked items with counts and changes), and mentions support for filtering. However, it lacks details on permissions, rate limits, or error handling, leaving some gaps for a tool with 6 parameters.

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 in two sentences: the first states the purpose and return format, the second adds behavioral details. Every sentence earns its place by providing essential information without redundancy, making it front-loaded and easy to parse.

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 complexity of a 6-parameter tool with no annotations and no output schema, the description is reasonably complete. It covers the core functionality, return format, and key behavioral aspects like period calculation. However, it could improve by detailing output structure more explicitly or addressing potential limitations, leaving minor gaps.

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

Parameters3/5

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

Schema description coverage is 100%, so the schema already documents all parameters thoroughly. The description adds minimal value beyond the schema, only implicitly referencing parameters like 'groupBy', 'direction', and 'subscription' without providing additional semantics. Baseline 3 is appropriate as the schema does the heavy lifting.

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 specific action ('Find top N accounts or groups with highest visit/usage increase or decrease'), identifies the resource ('accounts or groups'), and distinguishes from siblings by focusing on ranking by change between periods rather than general metrics or breakdowns. It explicitly mentions what it returns, making the purpose unambiguous.

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

Usage Guidelines3/5

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

The description implies usage for analyzing changes in visits/usage over time, but does not explicitly state when to use this tool versus alternatives like 'get_visit_trends' or 'get_usage_summary'. It mentions filtering by subscription tier, which provides some context, but lacks clear guidance on scenarios or exclusions compared to sibling tools.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

  1. 8 tool updatesv1.0.0
    • First observedfind_entities_by_metric
    • First observedget_index_fields
    • First observedget_platform_breakdown
    • First observedget_rating_distribution
    • First observedget_subscription_breakdown
    • First observedget_usage_summary
    • First observedget_visit_trends
    • First observedtop_change

TDQS

A4/5.0

Scored across 8 tools

Disambiguation5/5

Each tool has a clearly distinct purpose with no ambiguity. For example, find_entities_by_metric filters entities by metrics, get_usage_summary provides aggregated usage data, and get_visit_trends focuses on time-series trends. The descriptions reinforce non-overlapping functionalities, making tool selection straightforward.

Naming Consistency5/5

All tools follow a consistent verb_noun pattern (e.g., get_usage_summary, find_entities_by_metric, top_change). The naming is uniform across all eight tools, using snake_case and descriptive terms that clearly indicate their functions without any deviations or mixed conventions.

Tool Count5/5

With 8 tools, the server is well-scoped for analytics and data retrieval in an Elasticsearch context. Each tool serves a specific analytical purpose (e.g., breakdowns, trends, distributions), and none appear redundant or trivial, making the count appropriate for the domain.

Completeness4/5

The toolset covers core analytics operations like summaries, trends, breakdowns, and distributions, with good coverage for metrics such as visits, ratings, and subscriptions. A minor gap exists in CRUD operations (e.g., creating or updating data), but this is reasonable given the server's focus on querying and analysis rather than data manipulation.

Related MCP Connectors