Skip to main content
Glama

Islam West Africa Collection (IWAC)

Topic distribution

get_topic_distribution
Read-onlyIdempotent

Counts of offline LDA topic assignments, optionally over time. Topic labels are interpretive model outputs; exact topic_id filters select assignments rather than keyword matches. Reports unclassified coverage.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
exactNoAND values. Fields: subject/spatial/author/language/country/newspaper/topic_id/min_prob/scored_by; country_raw=whole cell; polarity:<model>.
top_nNoTopics given their own band in over_time (default 8, max 15)
subsetNoarticles (default) | references
countryNoExact country name (accents optional)
date_toNo
keywordNo
subjectNoExact tag
min_probNo0-1; keep only assignments at or above this probability
date_fromNoInclusive date bounds: YYYY[-MM[-DD]]
newspaperNoNewspaper/periodical substring
over_timeNoAlso return per-year counts for the leading topics
hijri_yearNo
hijri_monthNo
keyword_modeNo
keyword_aliasesNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
noteNo
spanNo
viewYes
subsetYes
topicsYes
filtersYes
periodsNo
classifiedYes
total_matchesYes
trend_by_topicNo
series_by_topicNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed14 schema fields changed
    • changedInput schema / properties / country / description
      Previous value: -"Exact country name: Benin | Burkina Faso | Côte d'Ivoire | Niger | Nigeria | Togo (accents optional)"New value: +"Exact country name (accents optional)"
    • changedInput schema / properties / date_from / description
      Previous value: -"YYYY-MM-DD (or YYYY)"New value: +"Inclusive date bounds: YYYY[-MM[-DD]]"
    • removedInput schema / properties / date_to / description
      Removed value: -"YYYY-MM-DD (or YYYY)"
    • addedInput schema / properties / exact
      Added value: +{
      +  "additionalProperties": {
      +    "items": {
      +      "type": "string"
      +    },
      +    "maxItems": 20,
      +    "minItems": 1,
      +    "type": "array"
      +  },
      +  "description": "AND values. Fields: subject/spatial/author/language/country/newspaper/topic_id/min_prob/scored_by; country_raw=whole cell; polarity:<model>.",
      +  "propertyNames": {
      +    "type": "string"
      +  },
      +  "type": "object"
      +}
    • addedInput schema / properties / hijri_month
      Added value: +{
      +  "type": "string"
      +}
    • addedInput schema / properties / hijri_year
      Added value: +{
      +  "type": "integer"
      +}
    • removedInput schema / properties / keyword / description
      Removed value: -"ONE French concept keyword; substring over the subset's text fields"
    • addedInput schema / properties / keyword / minLength
      Added value: +1
    • addedInput schema / properties / keyword_aliases
      Added value: +{
      +  "items": {
      +    "minLength": 1,
      +    "type": "string"
      +  },
      +  "maxItems": 12,
      +  "type": "array"
      +}
    • addedInput schema / properties / keyword_mode
      Added value: +{
      +  "enum": [
      +    "literal",
      +    "all_terms"
      +  ],
      +  "type": "string"
      +}
    • changedInput schema / properties / newspaper / description
      Previous value: -"Newspaper (articles) or periodical/series title (publications)"New value: +"Newspaper/periodical substring"
    • changedInput schema / properties / subject / description
      Previous value: -"Exact subject tag (pipe-aware)"New value: +"Exact tag"
    • removedInput schema / properties / top_n / maximum
      Removed value: -9007199254740991
    • removedInput schema / properties / top_n / minimum
      Removed value: --9007199254740991
  2. Changed2 schema fields changed
    • addedOutput schema / properties / span
      Added value: +{
      +  "items": {
      +    "type": "string"
      +  },
      +  "type": "array"
      +}
    • addedOutput schema / properties / trend_by_topic
      Added value: +{
      +  "additionalProperties": {
      +    "additionalProperties": {},
      +    "properties": {},
      +    "type": "object"
      +  },
      +  "propertyNames": {
      +    "type": "string"
      +  },
      +  "type": "object"
      +}
  3. Changed2 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"
    • changedOutput schema / $schema
      Previous value: -"http://json-schema.org/draft-07/schema#"New value: +"https://json-schema.org/draft/2020-12/schema"
  4. Added

TDQS

A3.6/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, non-destructive, closed-world), so the bar is lower. The description adds real context beyond that: topic labels are interpretive model outputs (a reliability caveat) and the result reports unclassified coverage, plus optional over-time behavior.

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?

Three tight sentences, front-loaded with the core capability before the caveats. Every clause adds information; nothing is filler, though the interpretive-model caveat could be slightly more prominent.

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

Completeness3/5

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

For a 15-parameter analytical tool this covers the interpretive caveat and the unclassified-reporting behavior well, and an output schema exists so return values need no explanation. However, usage selection against sibling distribution tools and roughly 40% of undocumented parameters are left unaddressed.

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 60% with 15 parameters, including a nested 'exact' object. The description meaningfully clarifies exact.topic_id semantics ('select assignments rather than keyword matches') and nods to over_time, but says nothing about subset, min_prob, top_n, hijri_*, keyword_mode or keyword_aliases, so it only partially compensates for the coverage gap.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

Opens with a specific verb+resource ('Counts of offline LDA topic assignments') and explicitly frames the assignment-vs-keyword distinction, which separates it from search tools. It is clear what the tool returns, though it never names or contrasts a sibling like get_field_distribution or get_semantic_map.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Usage is only implied: an agent can infer you call this when you want topic counts, and the exact.topic_id note warns against expecting keyword matching. There is no explicit when-to-use statement, no exclusions, and no routing to alternative distribution tools for other facets.

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.