Skip to main content
Glama

Breakdown Stats

get_breakdown
Read-onlyIdempotent

Cross-tabulation aggregation grouped by one dimension

Returns record counts filtered by any combination of archive, source type, event type, event place and year range, grouped by ONE chosen dimension (archive, sourcetype, eventtype, place or year). Use this endpoint to answer questions such as "how many Bidprentjes per archive?" or "how many marriages per year in Amsterdam?". The response includes the total filtered record count, the total number of distinct groups (capped at 750) and the top-N groups according to the chosen sort.

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": {
      "group_by": "<group_by>"
    },
    "name": "get_breakdown"
  }
}

Input Schema

NameRequiredDescriptionDefault
langNo
sortNo
group_byYes
year_endNo
eventtypeNo
min_countNo
eventplaceNo
sourcetypeNo
year_startNo
number_showNo
archive_codeNo

Output Schema

NameRequiredDescriptionDefault
filtersNoEchoes the filter parameters supplied by the caller. Only filters actually present in the request are echoed; defaults are not.
resultsNoTop-N groups according to the chosen sort, truncated to `number_show`.
group_byNoDimension on which the results are grouped.
total_groupsNoTotal distinct groups matching `min_count`. Capped at 750 (the SOLR_FACET_MAX limit). When this equals 750 the true number of groups may be higher.
total_recordsNoTotal number of records matching the supplied filters.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed8 schema fields changed
    • changedInput schema / $schema
      Previous value: -"http://json-schema.org/draft-07/schema#"New value: +"https://json-schema.org/draft/2020-12/schema"
    • removedInput schema / additionalProperties
      Removed value: -false
    • addedInput schema / properties / eventtype / anyOf
      Added value: +[
      +  {
      +    "const": 0,
      +    "type": "number"
      +  },
      +  {
      +    "const": 1,
      +    "type": "number"
      +  },
      +  {
      +    "const": 2,
      +    "type": "number"
      +  },
      +  {
      +    "const": 3,
      +    "type": "number"
      +  },
      +  {
      +    "const": 6,
      +    "type": "number"
      +  }
      +]
    • removedInput schema / properties / eventtype / enum
      Removed value: -[
      -  0,
      -  1,
      -  2,
      -  3,
      -  6
      -]
    • removedInput schema / properties / eventtype / type
      Removed value: -"number"
    • addedInput schema / properties / min_count / maximum
      Added value: +9007199254740991
    • addedInput schema / properties / number_show / minimum
      Added value: +-9007199254740991
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "$schema": "https://json-schema.org/draft/2020-12/schema",
      +  "description": "Cross-tabulation result returned by `/stats/breakdown.json`. Records matching the supplied filters are aggregated on the dimension chosen by `group_by`.\n",
      +  "properties": {
      +    "filters": {
      +      "description": "Echoes the filter parameters supplied by the caller. Only filters actually present in the request are echoed; defaults are not.\n",
      +      "type": "object"
      +    },
      +    "group_by": {
      +      "description": "Dimension on which the results are grouped.",
      +      "type": "string"
      +    },
      +    "results": {
      +      "description": "Top-N groups according to the chosen sort, truncated to `number_show`.",
      +      "items": {
      +        "description": "One group within a breakdown response.",
      +        "properties": {
      +          "count": {
      +            "description": "Number of records in this group after filters are applied.",
      +            "type": "integer"
      +          },
      +          "key": {
      +            "description": "Raw facet value identifying the group. For `archive` this is the archive_code; for `sourcetype` and `eventtype` it is the Dutch raw value; for `place` it is the place name; for `year` it is the year as a string.\n",
      +            "type": "string"
      +          },
      +          "label": {
      +            "description": "Human-readable label, localised when `lang` is supplied. Only present for `archive`, `sourcetype` and `eventtype` groupings.\n",
      +            "type": "string"
      +          }
      +        },
      +        "type": "object"
      +      },
      +      "type": "array"
      +    },
      +    "total_groups": {
      +      "description": "Total distinct groups matching `min_count`. Capped at 750 (the SOLR_FACET_MAX limit). When this equals 750 the true number of groups may be higher.\n",
      +      "type": "integer"
      +    },
      +    "total_records": {
      +      "description": "Total number of records matching the supplied filters.",
      +      "type": "integer"
      +    }
      +  },
      +  "type": "object"
      +}
  2. First observed

TDQS

A4.1/5.0
Behavior4/5

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

Annotations already declare readOnlyHint, idempotentHint, and destructiveHint=false, so the safety profile is covered; the description adds behavior beyond them, notably that the group count is capped at 750 and that only the top-N groups are returned according to the chosen sort. It does not mention pagination depth, permissions, or rate limits, but the cap disclosure is the operationally important detail for an aggregating endpoint.

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?

Front-loaded with the operation, then the grouping constraint, then examples, then return shape — a sensible order with no filler. The opening phrase is mildly restated by the following sentence ('filtered ... grouped by ONE chosen dimension'), a small redundancy rather than a problem.

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?

With an output schema present and rich annotations, the description need not explain return values, and it doesn't overreach. For an 11-parameter tool it is nearly sufficient, with the remaining gap being the undocumented semantics of min_count and lang, plus no guidance on how year_start/year_end interact with group_by 'year'.

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 0% across 11 parameters, so the description has to carry the load and it only partially does. It explains the filtering axes (archive, source type, event type, event place, year range), group_by, sort, and the top-N notion, but leaves lang, min_count, and archive_code unexplained and gives no syntax or format hints for the string filters.

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 names a specific operation (cross-tabulation aggregation of record counts) and a specific constraint (grouped by exactly ONE chosen dimension, from an enumerated list). It goes further with two concrete example questions, so an agent can tell this is a grouped count tool rather than a record search or a single-dimension stat tool.

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?

It states when to reach for this tool via concrete example questions ('how many Bidprentjes per archive?'), which gives clear positive usage context. It gives no when-not guidance and does not route to the overlapping siblings (get_event_type_stats, get_source_type_stats, get_archives) that answer narrower versions of the same question.

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.