Skip to main content
Glama

Islam West Africa Collection (IWAC)

Topic distribution

get_topic_distribution
Read-onlyIdempotent

How a filtered set distributes across the precomputed LDA topics, each labelled by its top terms (articles carry 30 topics and are ~99.5% classified; references have their own 33-topic model and only ~46% carry an assignment, so read its classified against total_matches). Topics are assigned offline over the full text, so they describe what a piece is ABOUT rather than which words it contains — use this instead of keyword counting to map a corpus. Optional over_time returns per-year counts for the leading topics. min_prob keeps only articles where the topic is at least that dominant (mean assignment probability is 0.34, so 0.5 is already a strong filter).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
top_nNoTopics given their own band in over_time (default 8, max 15)
subsetNoarticles (default) | references
countryNoExact country name: Benin | Burkina Faso | Côte d'Ivoire | Niger | Nigeria | Togo (accents optional)
date_toNoYYYY-MM-DD (or YYYY)
keywordNoONE French concept keyword; substring over the subset's text fields
subjectNoExact subject tag (pipe-aware)
min_probNo0-1; keep only assignments at or above this probability
date_fromNoYYYY-MM-DD (or YYYY)
newspaperNoNewspaper (articles) or periodical/series title (publications)
over_timeNoAlso return per-year counts for the leading topics

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. 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"
      +}
  2. 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"
  3. Added

TDQS

A4.7/5.0
Behavior5/5

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

The description goes well beyond the annotations (readOnly, idempotent, non-destructive) by revealing the underlying model behavior: articles are 99.5% classified with 30 topics, while references have a separate 33-topic model with only ~46% classification. It also explains that topics are assigned offline over full text, meaning they describe content rather than surface word matches, and gives typical min_prob values with mean probability 0.34. This is rich behavioral context not available in 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 a dense four-sentence paragraph, longer than the calibration HIGH example, but every sentence contributes useful information. It is front-loaded with the core purpose, then adds needed caveats and parameter guidance. Slightly verbose but not wasteful; no fluff.

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?

Given that an output schema exists, the description does not need to detail return values, but it still clarifies important output nuances (e.g., 'read its classified against total_matches'). It provides essential context about topic model differences between articles and references, and explains over_time and min_prob behavior. It is complete for a read-only analytics tool with 10 optional parameters, though it could mention top_n more explicitly, but that is covered by the schema.

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?

The schema already has 100% coverage for 10 parameters, so baseline is 3. The description adds practical guidance for over_time ('returns per-year counts for the leading topics') and min_prob ('keeps only articles where the topic is at least that dominant, mean 0.34, so 0.5 strong'), which supplements schema descriptions. It does not cover all parameters, but adds meaningful value for key ones.

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 clearly states the tool's purpose: distributing a filtered set across precomputed LDA topics, with topics labelled by top terms. It distinguishes itself from keyword counting ('use this instead of keyword counting') and from sibling distribution tools by focusing on topic-based semantic mapping. The verb 'get' plus specific resource ('topic distribution') is precise.

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 tells when to use this tool: 'use this instead of keyword counting to map a corpus' — a direct alternative. It also clarifies the difference between article and reference subsets, and explains how over_time and min_prob can be used for different analytical needs. This provides clear context for tool selection.

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.