Skip to main content
Glama

skkg_collection_stats

skkg_collection_stats
Read-onlyIdempotent

Count SKKG collection objects by dimension with search and field filters; add a breakdown to cross-tabulate two dimensions for distributions and how-many questions.

Instructions

Count SKKG objects by one dimension, with the filters of skkg_search_objects. A query narrows them like a search. Use it for "how many", "which most", and distributions; use skkg_search_objects to list the objects. An object counts once per value, so an object with two materials counts in both and the bucket counts can add up to more than total_objects; without_value counts the objects that have none. breakdown adds a second dimension per bucket (a cross table). Buckets carry filter, the skkg_search_objects arguments that list exactly their objects when added to this call's arguments (production decades have none). With a creator filter, the creator dimensions count only the creator rows it matches: with creator, dimension creator_role gives that creator's roles. Two creator dimensions (creator, creator_role, attribution) are crossed per creator row: creator by creator_role gives each creator's own roles. With no query and no filter, the whole collection is counted.

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": {
      "dimension": "<dimension>"
    },
    "name": "skkg_collection_stats"
  }
}

Input Schema

NameRequiredDescriptionDefault
topNoBuckets per page; at most 50 with a breakdown
langNoLanguage of vocabulary labels. Most vocabularies, materials and object types among them, have German labels only, which are returned whatever the language; titles and texts stay as recordedde
epochNoEpoch label as SKKG dates objects, e.g. "19. Jh.", "1. Hälfte 20. Jh.". A term id ("type/…") or a German label, matched exactly except for case.
orderNocount: largest buckets first (default); value: chronological, for the decade dimensions only (their default)
queryNoGerman keywords over titles, inscriptions, object texts, and inventory numbers. Every word must occur; "a phrase" matches in order; a trailing * matches a prefix; OR between two words matches either; NOT before a word excludes it. Umlauts may be written ä or ae
scopeNoWhere the query matches: all (default), title, inscription, text (descriptions), or inventory_numberall
offsetNo
creatorNoCreator: an actor id ("person/41") or a name ("Anker", "Albert Anker"). A name matches every person whose name contains all its words; applied_filters lists them
date_toNoLatest year of production; see date_from
part_ofNoObject id (its parts) or object group id (its members)
materialNoMaterial, e.g. "Holz", "Papier", "Silber". A term id ("type/…") or a German label, matched exactly except for case.
breakdownNoOptional second dimension, counted within each bucket of `dimension`; two creator dimensions are crossed per creator row: object_type (object type, as recorded (not rolled up to broader types)); material (material; an object with several counts in each); technique (technique); epoch (epoch ("19. Jh.")); object_copyright (copyright status of the object); provenance_status (provenance research status); image_license (licence of the primary image); creator (person or institution named as creator, "influenced by" included, as the creator filter matches); creator_role (role of a creator ("Künstler:in", "Verlag")); attribution (attribution qualifier ("zugeschrieben", "nach")); acquisition_type (how SKKG acquired it); acquisition_decade (decade of SKKG's acquisition); production_decade (decade of production, only for objects dated within one decade; no filter)
date_fromNoEarliest year of production. Matches objects whose dating overlaps the range; undated objects never match
dimensionYesWhat to count by: object_type (object type, as recorded (not rolled up to broader types)); material (material; an object with several counts in each); technique (technique); epoch (epoch ("19. Jh.")); object_copyright (copyright status of the object); provenance_status (provenance research status); image_license (licence of the primary image); creator (person or institution named as creator, "influenced by" included, as the creator filter matches); creator_role (role of a creator ("Künstler:in", "Verlag")); attribution (attribution qualifier ("zugeschrieben", "nach")); acquisition_type (how SKKG acquired it); acquisition_decade (decade of SKKG's acquisition); production_decade (decade of production, only for objects dated within one decade; no filter)
has_imageNoOnly objects with (true) or without (false) a published image
techniqueNoTechnique, e.g. "bemalt", "vergoldet", "geschnitzt". A term id ("type/…") or a German label, matched exactly except for case.
exhibitionNoExhibition id: only objects shown in it
literatureNoLiterature id: only objects it refers to
attributionNoAttribution qualifier, e.g. "zugeschrieben", "nach", "Kopie nach". Applies to the same creator row as `creator`. A term id ("type/…") or a German label, matched exactly except for case.
object_typeNoObject type, e.g. "Zeichnung" or "Malerei". A term id ("type/…") or a German label, matched exactly except for case.
creator_roleNoRole of the creator, e.g. "Künstler:in", "Verlag", "Stecher:in". Applies to the same creator row as `creator`. A term id ("type/…") or a German label, matched exactly except for case.
acquired_fromNoWho SKKG acquired the object from: an actor id or a name, as for `creator`
breakdown_topNoValues of `breakdown` per bucket, largest first. Default 10
image_licenseNoLicence of the object's primary image: "CC0 1.0", "CC BY 4.0", or "©". A term id ("type/…") or a German label, matched exactly except for case.
acquisition_typeNoHow SKKG acquired the object, e.g. "Auktion", "Ankauf", "Schenkung". A term id ("type/…") or a German label, matched exactly except for case.
include_narrowerNoTerm filters also match narrower terms, e.g. "Malerei" includes "Malerei auf Papier". Default true
object_copyrightNoCopyright status of the object itself: "gemeinfrei" or "Copyright". A term id ("type/…") or a German label, matched exactly except for case.
provenance_statusNoProvenance research status: "klar", "geklärt", or "ungeklärt". A term id ("type/…") or a German label, matched exactly except for case.
acquisition_year_toNoLatest year of SKKG's acquisition
exclude_attributionsNoAttribution labels or ids; leaves out objects with a creator so attributed. With `creator`, `creator_role`, or `attribution`, only the creator row those match counts, e.g. ["nach", "Kopie nach"] for works by the creator rather than after them
has_provenance_chainNoOnly objects with (true) or without (false) a provenance chain before SKKG
acquisition_year_fromNoEarliest year of SKKG's acquisition

Output Schema

NameRequiredDescriptionDefault
orderYes
offsetYes
bucketsYes
has_moreYes
returnedYes
warningsNo
breakdownNo
dimensionYes
data_as_ofNo
with_valueYesOf these, objects with at least one value for `dimension`
next_offsetNo
total_bucketsYes
total_objectsYesObjects the query and filters match
without_valueYes
applied_filtersNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.5.0

TDQS

A4.3/5.0
Behavior4/5

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

Annotations already cover the safety profile (readOnly, idempotent, closed-world), yet the description still adds genuinely non-obvious behavior: objects count once per value so buckets can exceed total_objects, without_value accounts for objects lacking the value, breakdown produces a cross table, and buckets carry a `filter` payload that lists exactly their objects. The creator-row crossing rule (creator filter restricts creator dimensions to matching rows) is disclosed but phrased densely enough that it takes a second read.

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?

Purpose and the sibling routing are front-loaded in the first two sentences, which is correct. It is dense rather than padded, though the creator-dimension explanation repeats itself ('two creator dimensions are crossed per creator row' followed by a restatement) and the bucket-filter clause is buried mid-paragraph.

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 32-parameter aggregation tool with an output schema and near-total schema coverage, the description addresses the hard parts: counting multiplicity, cross-tabulation, and the filter payload on buckets. Pagination/offset interaction and the shape of the returned stats are left to the structured fields, which is acceptable given an output schema exists.

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 coverage is 97%, so nearly every parameter is already documented in structured form; the baseline of 3 applies. The description does add cross-parameter meaning the schema cannot express — how `query` interacts with scope, how a creator filter reshapes creator dimensions, and that production_decade buckets carry no filter — but it leaves the majority of the 32 parameters to the schema.

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?

Opens with a specific verb and resource ('Count SKKG objects by one dimension') and immediately scopes it against the sibling: 'use skkg_search_objects to list the objects.' An agent can tell aggregate-vs-list apart without opening either schema.

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?

States the use cases explicitly ('how many', 'which most', distributions) and names the alternative tool with the condition that selects it. It also covers the degenerate case: 'With no query and no filter, the whole collection is counted.'

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