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.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "view": "<view>",
      "namespace": "<namespace>"
    },
    "name": "stats_fetch"
  }
}

Input 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), "breakdown" (the per-block detail, or the per-Riddle summary for namespace "user") or "lookerLink" (no dates, Enterprise): no numbers but {url}, a Looker Studio link opening a ready-made report - per Riddle, per project, or for the whole account (namespace "user", no entityId; with the key\'s own user id: its personal project). On first use the user authorizes the Riddle connector there, then opens the link again.
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.

  1. Changed2 schema fields changed
    • changedInput schema / properties / view / description
      Previous value: -"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\")."New value: +"How deeply to measure: \"totals\" (one aggregate for the period), \"timeseries\" (that aggregate per consecutive interval, requires dateFrom and dateTo), \"breakdown\" (the per-block detail, or the per-Riddle summary for namespace \"user\") or \"lookerLink\" (no dates, Enterprise): no numbers but {url}, a Looker Studio link opening a ready-made report - per Riddle, per project, or for the whole account (namespace \"user\", no entityId; with the key\\'s own user id: its personal project). On first use the user authorizes the Riddle connector there, then opens the link again."
    • changedInput schema / properties / view / enum
      Previous value: -[
      -  "totals",
      -  "timeseries",
      -  "breakdown"
      -]New value: +[
      +  "totals",
      +  "timeseries",
      +  "breakdown",
      +  "lookerLink"
      +]
  2. 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"
      +]
  3. First observed

TDQS

A4.5/5.0
Behavior4/5

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

Annotations already cover readOnly/idempotent/non-destructive safety, and the description goes well beyond them by disclosing the response document shape, where metrics live, the interval aggregation caveat, the USER-key requirement, and the crucial empty-vs-zero distinction. Slightly short of 5 only because the wall-of-text delivery blurs some of these points.

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 real signal (empty vs zero, interval total not daily, publish check), so it earns its length in content, but it is delivered as one dense run-on paragraph with no headings or front-loading of the most critical pitfalls. Structure could be far better for such a rich description.

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?

There is no output schema, so the description fully carries the burden of explaining return values, and it does: the core_metrics/stats location, block stats, timeseries interval structure, and breakdown shapes per namespace. An agent has enough to call correctly and interpret results.

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 baseline is 3; the description adds meaning by tying entityId sources to project_list/whoami/riddle_list, clarifying that the account-wide summary rejects entityId, and explaining date defaults and per-view behavior. It mostly reinforces the schema rather than introducing new syntax.

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?

States a specific verb-plus-resource (views/starts/submissions of one entity) and immediately explains how namespace+entityId select the target and how 'view' controls depth. No sibling tool measures statistics, so the purpose stands apart without ambiguity.

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?

Gives concrete when-to-use guidance per view: prefer a short range or one Riddle on a big project, narrow with projectIds rather than paging on a big account, and the account-wide summary requires a USER API key and takes no entityId. It also names the prerequisites for breaking down a Riddle and how to interpret empty results.

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.

Resources