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.8/5.0
Behavior5/5

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

Annotations already declare readOnly and idempotent hints, and the description adds substantial non-obvious behavior: the response IS the entity's stats document with metrics under global_stats vs stats, timeseries intervals are totals not daily numbers, an empty response means nothing recorded while a missing key inside populated core_metrics is a genuine zero, and a breakdown still returns a full zeroed tree for an unpublished Riddle. No contradiction with annotations.

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 long, but the tool is complex: three views, three namespaces, two no-data cases, and interval semantics. Nearly every clause carries a distinct constraint or interpretation rule, and the text is logically ordered from purpose to response shape to per-view behavior to no-data pitfalls. It is not broken into sections, but it begins with the core concept and avoids filler.

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?

With no output schema, the description must bear the full burden of explaining return values, and it does so thoroughly: exact JSON key locations, timeseries interval structure, pagination via hasMore, and the two kinds of no data. It even anticipates likely errors, such as reading only 'stats' for a Riddle, misreading the shorter final interval as a drop, and treating unopened zeros as findings before checking riddle_get publish state.

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?

Input schema coverage is 100%, so the baseline is 3. The description adds parameter-level value beyond the schema: the user breakdown requires a USER API key and rejects entityId, sortBy ranks across the whole account before paging, page has a VALIDATION_ERROR contract, and projectIds are never silently skipped. The response-semantics compensation is extensive, though not needed for parameter naming since the schema already documents all fields.

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 line names the exact metrics and resource: 'Views/starts/submissions of one entity', keyed by namespace plus entityId and governed by view. The title 'Fetch riddle statistics' plus the description make clear this is a read-only stats retrieval tool, distinct from content tools like riddle_get because it returns measurement documents.

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 explicitly maps each view value to its use: 'totals', 'timeseries', and 'breakdown'. It also gives namespace-specific guidance, including when to prefer a short range or a single Riddle on a big project, that the user breakdown requires a USER API key and takes no entityId, and that riddle_get should be consulted for block IDs and publication status.

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.1/5.0
Disambiguation5/5

Each tool targets a distinct resource and action: media, palettes, projects, question banks, Riddle builds, publish lifecycle, tags, and templates are cleanly separated. Even near-neighbors like question_bank_get versus question_bank_get_items or riddle_tag versus question_bank_tag are disambiguated by explicit scope descriptions.

Naming Consistency4/5

Names follow a consistent lowercase snake_case domain-prefix plus action pattern, such as riddle_get, riddle_publish, question_bank_create, and media_delete. Minor deviations like question_bank_item, question_bank_manage, and the standalone ping/whoami break the pattern slightly.

Tool Count2/5

At 38 tools, the set is well above the 25+ threshold and is heavy for an agent to navigate in a single context. Most tools are individually justified, but the surface could be consolidated, particularly around tag operations, template listing variants, and question bank actions.

Completeness4/5

The Riddle lifecycle is well covered: build, validate, update, publish, unpublish, move, rename, delete, embed, tag, and fetch stats. Minor gaps remain, such as no template delete/update, no media library listing, and no project create/update/delete, but these are workable around or arguably outside the core domain.

Resources