Skip to main content
Glama

nevent_analytics_query

Read-only

Query event marketing analytics. Supports dimensions, metrics, time ranges, and filters across campaigns, purchases, users, and more. MANDATORY RULES: (1) ALWAYS call nevent_analytics_table_schema BEFORE querying to discover exact field names. NEVER guess field names. (2) For BOOLEAN fields, use operator "is_true" or "is_false". NEVER use "eq" with string "true"/"false". (3) For enum fields (state, status), check the field description for valid values. Common values: purchases.state = SUCCEEDED|COMPLETE|PENDING|FAILED; campaigns.status = EXECUTED|DRAFT|PAUSED|STOPPED.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
ctesNoCTE (Common Table Expression) sub-queries — v3.19.0+
sortNoSort the result rows. Accepts a single { field, order } object or an array for multi-field sorting.
limitNoMaximum rows to return (max 1000, default 100)
dryRunNoDry-run mode: estimate query cost without executing (v3.19.0+). Response includes estimatedBytes in metadata.
havingNoHAVING clause filters to apply after aggregation
filtersNoWHERE clause filters to apply before aggregation
groupByNoCalendar-based group-by fields (v3.19.0+). Known values: dayOfWeek | weekOfYear | hourOfDay | minuteOfHour | month | quarter | year
metricsNoAggregated metrics to compute (SUM, COUNT, etc.)
distinctNoAdd SELECT DISTINCT to deduplicate result rows (v3.19.0+)
timeRangeNoTime range filter with optional granularity for trend analysis
collectionYesCollection name, e.g. "purchases", "tickets", "campaigns"
dimensionsNoFields to group by (SELECT dimensions). Omit for aggregate-only queries.
sourceTableNoCTE name to use as source instead of a raw collection — v3.19.0+
comparePeriodsNoPeriod-over-period comparison (YoY, MoM, etc.) — v3.19.0+
timeGranularityNoTime granularity for bucketing (v3.19.0+). Known values: day | week | month | quarter | year | hour | minute | fiscalQuarter | fiscalYear
compareDimensionsNoComparative dimension analysis configuration

Schema Changelog

Changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. First observed

TDQS

A4.5/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true and destructiveHint=false, so the safety profile is established. The description adds genuine behavioral constraints beyond that: the API will fail or misbehave if field names are guessed, boolean fields reject 'eq' with string values, and enum filters must use documented valid values. It does not mention error behavior or result limits, but the schema independently documents limit and dryRun.

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 one-sentence purpose statement is front-loaded and the mandatory rules are numbered and scannable. Every clause earns its place — the rules target the three highest-risk failure modes. Slightly long given the schema already documents operators and collections, but the redundancy is justified because these are stated as prohibitions rather than descriptions.

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 16-parameter, nested-object tool with 100% schema coverage, the description's job is to highlight what the schema cannot: the discovery workflow, operator traps, and valid enum domains. It does that well, covering the principal blind spots for an agent. With no output schema, return-shape expectations are left unspecified, and newer features like CTEs, comparePeriods, and groupBy are not mentioned in prose — minor gaps since the schema documents them.

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 coverage is 100%, so the schema carries the full burden of documenting all 16 parameters — baseline 3. The description adds real value on top by giving collection-specific valid values for common filter fields (purchases.state = SUCCEEDED|COMPLETE|PENDING|FAILED, campaigns.status = EXECUTED|DRAFT|PAUSED|STOPPED) and by constraining how the 'operator' parameter must be used for booleans, which the schema's 'value' description does not fully convey.

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 opens with a specific verb+resource: 'Query event marketing analytics', then enumerates the capability surface (dimensions, metrics, time ranges, filters) and the data domains (campaigns, purchases, users). This clearly differentiates it from the many sibling lookups like nevent_get_campaign_metrics or nevent_list_campaigns, which are narrower retrieval tools rather than a general analytics query engine.

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 'MANDATORY RULES' block is exactly the guidance an agent needs: it explicitly names the sibling nevent_analytics_table_schema as an unconditional prerequisite ('ALWAYS call ... BEFORE querying'), and gives the precise boolean operator contract (is_true/is_false, never eq with strings) and concrete enum value sets for purchases.state and campaigns.status. This leaves no inference about the most failure-prone aspects of using the tool.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

TDQS

A3.6/5.0
Disambiguation3/5

Most domain groups are distinct, but the campaign reporting cluster has three tools returning overlapping engagement metrics (get_campaign, get_campaign_metrics, campaign_report), and paid_ads_status vs paid_ads_health have fuzzy boundaries. The detailed descriptions mitigate but do not eliminate the risk of an agent calling the wrong tool.

Naming Consistency3/5

All names use the nevent_ prefix and snake_case, and most CRUD operations follow verb_noun. However, several tools reverse the order or drop the verb entirely (segment_preview, segment_execute, campaign_report, paid_ads_status, analytics_query), making the convention mixed but still readable.

Tool Count1/5

With 59 tools, this is far above the 25+ 'too many' threshold and falls into the 50+ extreme range. The broad domain coverage explains some of the size, but for an agent the set is likely to be overwhelming and harder to navigate than a more focused server.

Completeness3/5

The core marketing workflow (segments, templates, campaign creation, quote, schedule, metrics) is covered, but there is no way to update, cancel, or delete a campaign, and templates and segments lack delete operations. These are notable lifecycle gaps that agents will hit when users want to change or clean up resources.