Skip to main content
Glama

stats_fetch

Read-onlyIdempotent

Views/starts/submissions of one entity - "namespace" plus "entityId" says which (a project, a user, or a Riddle by UUID), "view" how deeply. "totals": one aggregate for the period. The response IS the entity's stats document: metrics sit in "core_metrics" under "global_stats" (a Riddle) or under "stats" (a user/project aggregate, or an old Riddle) - read only "stats" and a Riddle with real traffic looks unmeasured. A Riddle also carries one "block__stats" per block, keyed by riddle_get's ids. "timeseries": those numbers per consecutive interval - {intervalDays, intervalCount, intervals}, each {from, to, days, stats} inclusive of both ends. Up to 31 days give one interval per day; a longer range is grouped into at most 31 equal intervals whose "stats" is the interval TOTAL, not a daily number - divide by "days", and never read the shorter final interval as a drop. "breakdown" is per namespace: "riddle" gives one Riddle down to its blocks, choices and fields, every "id" being the stored block id riddle_get's "build" exposes, so a weak question can be fixed directly; "project" gives that tree for every Riddle in it - prefer a short range, or one Riddle, on a big project; "user" gives NOT a deep breakdown but the account-wide summary: one row per Riddle plus the totals over every Riddle in scope, ranked by sortBy, 25 per page ("hasMore" says whether another follows), narrowed with projectIds rather than paged on a big account, requires a USER API key, takes no entityId. Two kinds of "no data": an empty response ({}, always an object, never a list) means nothing was recorded - report "no stats recorded", never 0 - while a missing key inside a POPULATED "core_metrics" is a genuine zero (no "finish" beside a "view" means no submissions). A "breakdown" signals nothing by shape: a Riddle nobody opened still answers with its full tree at 0, so confirm it was published then (riddle_get's "published": null means it never was) before reading zeros as a finding.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pageNoPage number of the account-wide summary, 1-indexed (default: 1). Zero or negative is rejected with a VALIDATION_ERROR, not clamped to page 1 - the same contract as riddle_list/project_list. That view only.
viewYesHow deeply to measure: "totals" (one aggregate for the period), "timeseries" (that aggregate per consecutive interval, requires dateFrom and dateTo) or "breakdown" (the per-block detail, or the per-Riddle summary for namespace "user").
dateToNoEnd date (inclusive), format: YYYY-MM-DD, e.g. "2026-01-31". Same rules as dateFrom; where a default applies it is today.
sortByNoMetric the account-wide summary's Riddles are ranked by before the page is cut: "views" (default), "starts", "submissions" or "timeActive". Sorting always spans the whole account (or the projects given), so page 1 is genuinely the top of the account. That view only.
dateFromNoStart date (inclusive), format: YYYY-MM-DD, e.g. "2026-01-01". Required for "timeseries". On "totals" and a Riddle/project "breakdown", omit both dates for alltime and pass only one for an open-ended range; the account-wide summary and the project breakdown instead default to one CALENDAR month before today - the same default the Creator's dashboards use, so 29 to 32 days depending on the month, not exactly 30. Send it explicitly when the exact span matters.
entityIdNoID of the entity: a project ID (integer as string) for "project", a user ID (integer as string) for "user", a Riddle UUID for "riddle". Get them from project_list, whoami ("user", not the string "user") and riddle_list respectively. Required for every view except the account-wide summary (view "breakdown" with namespace "user"), which measures the API key's own account and rejects it.
namespaceYesEntity type to fetch stats for.
projectIdsNoNarrow the account-wide summary to these project IDs (array of integers, from project_list). Omit to cover the whole account, including the personal project. Passing a project the user cannot view stats of is an error, not a silently skipped project. That view only.

Schema Changelog

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

  1. Changed11 schema fields changed
    • changedInput schema / properties / dateFrom / description
      Previous value: -"Start date (inclusive), format: YYYY-MM-DD. Omit both dateFrom and dateTo to get alltime stats."New value: +"Start date (inclusive), format: YYYY-MM-DD, e.g. \"2026-01-01\". Required for \"timeseries\". On \"totals\" and a Riddle/project \"breakdown\", omit both dates for alltime and pass only one for an open-ended range; the account-wide summary and the project breakdown instead default to one CALENDAR month before today - the same default the Creator's dashboards use, so 29 to 32 days depending on the month, not exactly 30. Send it explicitly when the exact span matters."
    • changedInput schema / properties / dateTo / description
      Previous value: -"End date (inclusive), format: YYYY-MM-DD. Omit both dateFrom and dateTo to get alltime stats."New value: +"End date (inclusive), format: YYYY-MM-DD, e.g. \"2026-01-31\". Same rules as dateFrom; where a default applies it is today."
    • addedInput schema / properties / entityId / default
      Added value: +null
    • changedInput schema / properties / entityId / description
      Previous value: -"ID of the entity: a project ID (integer as string) for \"project\", a user ID (integer as string) for \"user\", a Riddle UUID for \"riddle\". Get them from project_list, whoami and riddle_list respectively."New value: +"ID of the entity: a project ID (integer as string) for \"project\", a user ID (integer as string) for \"user\", a Riddle UUID for \"riddle\". Get them from project_list, whoami (\"user\", not the string \"user\") and riddle_list respectively. Required for every view except the account-wide summary (view \"breakdown\" with namespace \"user\"), which measures the API key's own account and rejects it."
    • changedInput schema / properties / entityId / type
      Previous value: -"string"New value: +[
      +  "null",
      +  "string"
      +]
    • changedInput schema / properties / namespace / description
      Previous value: -"Entity type to fetch stats for: \"project\", \"user\" or \"riddle\"."New value: +"Entity type to fetch stats for."
    • addedInput schema / properties / page
      Added value: +{
      +  "default": null,
      +  "description": "Page number of the account-wide summary, 1-indexed (default: 1). Zero or negative is rejected with a VALIDATION_ERROR, not clamped to page 1 - the same contract as riddle_list/project_list. That view only.",
      +  "type": [
      +    "null",
      +    "integer"
      +  ]
      +}
    • addedInput schema / properties / projectIds
      Added value: +{
      +  "default": null,
      +  "description": "Narrow the account-wide summary to these project IDs (array of integers, from project_list). Omit to cover the whole account, including the personal project. Passing a project the user cannot view stats of is an error, not a silently skipped project. That view only.",
      +  "type": [
      +    "array",
      +    "null"
      +  ]
      +}
    • addedInput schema / properties / sortBy
      Added value: +{
      +  "default": null,
      +  "description": "Metric the account-wide summary's Riddles are ranked by before the page is cut: \"views\" (default), \"starts\", \"submissions\" or \"timeActive\". Sorting always spans the whole account (or the projects given), so page 1 is genuinely the top of the account. That view only.",
      +  "enum": [
      +    "views",
      +    "starts",
      +    "submissions",
      +    "timeActive"
      +  ],
      +  "type": "string"
      +}
    • addedInput schema / properties / view
      Added value: +{
      +  "description": "How deeply to measure: \"totals\" (one aggregate for the period), \"timeseries\" (that aggregate per consecutive interval, requires dateFrom and dateTo) or \"breakdown\" (the per-block detail, or the per-Riddle summary for namespace \"user\").",
      +  "enum": [
      +    "totals",
      +    "timeseries",
      +    "breakdown"
      +  ],
      +  "type": "string"
      +}
    • changedInput schema / required
      Previous value: -[
      -  "namespace",
      -  "entityId"
      -]New value: +[
      +  "view",
      +  "namespace"
      +]
  2. First observed

TDQS

A4.5/5.0
Behavior5/5

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

Annotations already declare readOnlyHint=true and idempotentHint=true, yet the description goes far beyond them: the response IS the entity's stats document with metrics under either 'global_stats' or 'stats' depending on Riddle age, the 31-interval grouping where 'stats' is a TOTAL to divide by 'days', the empty-object vs missing-key zero semantics ('report no stats recorded, never 0'), pagination at 25 per page with hasMore, and the published-null verification caveat. Exceptionally candid about traps.

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

Conciseness3/5

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

Every sentence carries substantive edge-case information with zero fluff, and the purpose is front-loaded in the first clause. However, the entire disclosure is one dense ~450-word paragraph with heavy nesting and dashes, making it difficult for an agent to scan the three views, their response shapes, and the no-data rules. Paragraph breaks per view or a list structure would improve parseability substantially without cutting content.

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

Completeness5/5

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

For a tool with no output schema and high complexity (3 namespaces × 3 views, shape varying by Riddle age), the description covers response structure for every combination, interval math and its caveat, empty vs zero semantics, pagination, API key requirements, date defaults, and how to distinguish 'no data' from 'genuine zero'. Nothing an agent needs to call and interpret this tool correctly is missing.

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% with unusually rich per-parameter descriptions, so the baseline is 3. The tool description adds value above that by explaining cross-parameter semantics: valid view×namespace combinations, the user breakdown taking no entityId, the interaction between date range and interval count, and performance implications of namespace choice. It does not need to restate parameter syntax, which the schema already owns.

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 opening clause 'Views/starts/submissions of one entity' states a specific verb, resource, and metric set, immediately establishing what the tool returns. The namespace/entityId/view trio precisely defines the selection mechanism, and the tool is clearly distinct from every sibling (no other stats tool exists among them).

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?

Rich when-to-use context: which view suits which need, 'prefer a short range, or one Riddle, on a big project', the USER API key requirement for account-wide breakdown, and when to send dateFrom explicitly. It does not explicitly name alternative tools to route around, but references riddle_get as a complementary verification step, which is clear enough guidance for invocation.

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

A4.4/5.0
Disambiguation5/5

Each tool is scoped to a distinct resource/action area: media, palettes, projects, question banks, Riddles, templates, tags, stats, and support. Potentially close pairs like riddle_tag/riddle_tag_delete and question_bank_delete/question_bank_manage are cleanly separated by their descriptions, so an agent can reliably select the right one.

Naming Consistency4/5

The naming is mostly consistent snake_case with strong resource prefixes like riddle_, question_bank_, and template_, followed by clear verbs. Minor deviations such as question_bank_item, riddle_tag, and stats_fetch break the strict verb-noun pattern but remain predictable once the convention is understood.

Tool Count3/5

At 38 tools this is a heavy surface, though the breadth is justified by the many subdomains the server covers: media, palettes, projects, question banks, Riddles, templates, tags, and stats. Most tools earn their place, but the count sits above the range where an agent can quickly survey all options.

Completeness4/5

The set covers the full lifecycle for Riddles, question banks, templates, and tags, including publish/unpublish, move, stats, and media upload/delete. Minor gaps like no media library listing and read-only project settings are workable because media IDs come from upload responses and project permissions are exposed.

Resources