Skip to main content
Glama

Islam West Africa Collection (IWAC)

Aggregate AI sentiment

get_sentiment_distribution
Read-onlyIdempotent

Aggregate AI labels over a shared selection. model:"all" compares independent annotators and their coverage; model:"consensus" reads the stored panel majority. Choose compare_models and agreement_field for pairwise Cohen's kappa and quadratic weighted kappa, with explicit denominators. Labels are interpretations, not ground truth; subjectivity is weak evidence and its caveat must accompany findings.

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>.
modelNogpt-5-6-luna | mistral-small-2603 | deepseek-v4-flash-0731 | gemma-4-31b-it | qwen3-8-27b | all | consensus; default gpt-5-6-luna. Vendor aliases accepted; retired models rejected.
countryNoExact country name (accents optional)
date_toNo
keywordNo
subjectNoExact tag
date_fromNoInclusive date bounds: YYYY[-MM[-DD]]
newspaperNoNewspaper/periodical substring
hijri_yearNo
hijri_monthNo
keyword_modeNo
compare_modelsNoPair of model IDs or aliases; requires model:"all"
agreement_fieldNo
keyword_aliasesNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
noteNo
viewYes
modelYes
modelsNo
filtersYes
by_modelNo
coverageNo
disputedNo
agreementNo
consensusNo
model_caveatNo
subjectivityNo
total_articlesYes
agreement_matrixNo
polarity_distributionNo
centrality_distributionNo
subjectivity_median_rankNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed14 schema fields changed
    • addedInput schema / properties / agreement_field
      Added value: +{
      +  "enum": [
      +    "polarity",
      +    "centrality",
      +    "subjectivity"
      +  ],
      +  "type": "string"
      +}
    • addedInput schema / properties / compare_models
      Added value: +{
      +  "description": "Pair of model IDs or aliases; requires model:\"all\"",
      +  "items": false,
      +  "maxItems": 2,
      +  "minItems": 2,
      +  "prefixItems": [
      +    {
      +      "type": "string"
      +    },
      +    {
      +      "type": "string"
      +    }
      +  ],
      +  "type": "array"
      +}
    • changedInput schema / properties / country / description
      Previous value: -"Exact country name: Benin | Burkina Faso | Côte d'Ivoire | Niger | Togo (accents optional)"New value: +"Exact country name (accents optional)"
    • addedInput schema / properties / date_from
      Added value: +{
      +  "description": "Inclusive date bounds: YYYY[-MM[-DD]]",
      +  "type": "string"
      +}
    • addedInput schema / properties / date_to
      Added value: +{
      +  "type": "string"
      +}
    • 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"
      +}
    • addedInput schema / properties / keyword
      Added value: +{
      +  "minLength": 1,
      +  "type": "string"
      +}
    • 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 / model / description
      Previous value: -"gpt-5-6-luna | mistral-small-2603 | deepseek-v4-flash-0731 | gemma-4-31b-it | qwen3-8-27b | all | consensus — default gpt-5-6-luna; \"all\" adds the cross-model agreement, \"consensus\" returns the panel's precomputed majority (no annotator produced it, so it is never attributed to a model). The vendor shorthands chatgpt/mistral/deepseek/gemma/qwen also resolve to the model that ran. The generation-1 models (gemini-3-flash-preview, gpt-5-mini, ministral-14b-2512) are no longer served and return an error rather than a substitute — and 'gemini' is refused rather than read as gemma-4-31b-it, which is a different model line."New value: +"gpt-5-6-luna | mistral-small-2603 | deepseek-v4-flash-0731 | gemma-4-31b-it | qwen3-8-27b | all | consensus; default gpt-5-6-luna. Vendor aliases accepted; retired models rejected."
    • addedInput schema / properties / newspaper / description
      Added value: +"Newspaper/periodical substring"
    • addedInput schema / properties / subject / description
      Added value: +"Exact tag"
  2. Changed5 schema fields changed
    • changedInput schema / properties / model / description
      Previous value: -"gpt-5-6-luna | mistral-small-2603 | deepseek-v4-flash-0731 | gemma-4-31b-it | qwen3-8-27b | all — default gpt-5-6-luna; \"all\" adds the cross-model agreement. The vendor shorthands chatgpt/mistral/deepseek/gemma/qwen also resolve to the model that ran. The generation-1 models (gemini-3-flash-preview, gpt-5-mini, ministral-14b-2512) are no longer served and return an error rather than a substitute — and 'gemini' is refused rather than read as gemma-4-31b-it, which is a different model line."New value: +"gpt-5-6-luna | mistral-small-2603 | deepseek-v4-flash-0731 | gemma-4-31b-it | qwen3-8-27b | all | consensus — default gpt-5-6-luna; \"all\" adds the cross-model agreement, \"consensus\" returns the panel's precomputed majority (no annotator produced it, so it is never attributed to a model). The vendor shorthands chatgpt/mistral/deepseek/gemma/qwen also resolve to the model that ran. The generation-1 models (gemini-3-flash-preview, gpt-5-mini, ministral-14b-2512) are no longer served and return an error rather than a substitute — and 'gemini' is refused rather than read as gemma-4-31b-it, which is a different model line."
    • addedOutput schema / properties / consensus
      Added value: +{
      +  "additionalProperties": {},
      +  "properties": {},
      +  "type": "object"
      +}
    • addedOutput schema / properties / disputed
      Added value: +{
      +  "additionalProperties": {},
      +  "properties": {},
      +  "type": "object"
      +}
    • addedOutput schema / properties / note
      Added value: +{
      +  "type": "string"
      +}
    • addedOutput schema / properties / subjectivity_median_rank
      Added value: +{
      +  "additionalProperties": {},
      +  "properties": {},
      +  "type": "object"
      +}
  3. Changed3 schema fields changed
    • changedInput schema / properties / model / description
      Previous value: -"gpt-5-6-luna | mistral-small-2603 | deepseek-v4-flash-0731 | gemma-4-31b-it | all — default gpt-5-6-luna; \"all\" adds the cross-model agreement. The vendor shorthands chatgpt/mistral/deepseek/gemma also resolve to the model that ran. The generation-1 models (gemini-3-flash-preview, gpt-5-mini, ministral-14b-2512) are no longer served and return an error rather than a substitute — and 'gemini' is refused rather than read as gemma-4-31b-it, which is a different model line."New value: +"gpt-5-6-luna | mistral-small-2603 | deepseek-v4-flash-0731 | gemma-4-31b-it | qwen3-8-27b | all — default gpt-5-6-luna; \"all\" adds the cross-model agreement. The vendor shorthands chatgpt/mistral/deepseek/gemma/qwen also resolve to the model that ran. The generation-1 models (gemini-3-flash-preview, gpt-5-mini, ministral-14b-2512) are no longer served and return an error rather than a substitute — and 'gemini' is refused rather than read as gemma-4-31b-it, which is a different model line."
    • addedOutput schema / properties / coverage
      Added value: +{
      +  "additionalProperties": {
      +    "type": "number"
      +  },
      +  "propertyNames": {
      +    "type": "string"
      +  },
      +  "type": "object"
      +}
    • addedOutput schema / properties / model_caveat
      Added value: +{
      +  "type": "string"
      +}
  4. Changed1 schema field changed
    • changedInput schema / properties / model / description
      Previous value: -"gpt-5-6-luna | mistral-small-2603 | deepseek-v4-flash-0731 | all — default gpt-5-6-luna; \"all\" adds the cross-model agreement. The vendor shorthands chatgpt/mistral/deepseek also resolve to the model that ran. The generation-1 models (gemini-3-flash-preview, gpt-5-mini, ministral-14b-2512) are no longer served and return an error rather than a substitute."New value: +"gpt-5-6-luna | mistral-small-2603 | deepseek-v4-flash-0731 | gemma-4-31b-it | all — default gpt-5-6-luna; \"all\" adds the cross-model agreement. The vendor shorthands chatgpt/mistral/deepseek/gemma also resolve to the model that ran. The generation-1 models (gemini-3-flash-preview, gpt-5-mini, ministral-14b-2512) are no longer served and return an error rather than a substitute — and 'gemini' is refused rather than read as gemma-4-31b-it, which is a different model line."
  5. Changed1 schema field changed
    • changedInput schema / properties / model / description
      Previous value: -"gemini-3-flash-preview | gpt-5-mini | ministral-14b-2512 | all — default gemini-3-flash-preview; \"all\" adds the cross-model agreement. The vendor shorthands gemini/chatgpt/mistral are also accepted and resolve to the model that ran."New value: +"gpt-5-6-luna | mistral-small-2603 | deepseek-v4-flash-0731 | all — default gpt-5-6-luna; \"all\" adds the cross-model agreement. The vendor shorthands chatgpt/mistral/deepseek also resolve to the model that ran. The generation-1 models (gemini-3-flash-preview, gpt-5-mini, ministral-14b-2512) are no longer served and return an error rather than a substitute."
  6. Changed1 schema field changed
    • changedInput schema / properties / model / description
      Previous value: -"gemini (default) | chatgpt | mistral | all — \"all\" adds the cross-model agreement"New value: +"gemini-3-flash-preview | gpt-5-mini | ministral-14b-2512 | all — default gemini-3-flash-preview; \"all\" adds the cross-model agreement. The vendor shorthands gemini/chatgpt/mistral are also accepted and resolve to the model that ran."
  7. 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"
  8. Changed8 schema fields changed
    • addedInput schema / properties / model
      Added value: +{
      +  "description": "gemini (default) | chatgpt | mistral | all — \"all\" adds the cross-model agreement",
      +  "type": "string"
      +}
    • addedOutput schema / properties / agreement
      Added value: +{
      +  "additionalProperties": {},
      +  "properties": {},
      +  "type": "object"
      +}
    • addedOutput schema / properties / agreement_matrix
      Added value: +{
      +  "additionalProperties": {},
      +  "properties": {},
      +  "type": "object"
      +}
    • addedOutput schema / properties / by_model
      Added value: +{
      +  "additionalProperties": {
      +    "additionalProperties": {},
      +    "properties": {},
      +    "type": "object"
      +  },
      +  "propertyNames": {
      +    "type": "string"
      +  },
      +  "type": "object"
      +}
    • addedOutput schema / properties / models
      Added value: +{
      +  "items": {
      +    "type": "string"
      +  },
      +  "type": "array"
      +}
    • addedOutput schema / properties / subjectivity
      Added value: +{
      +  "additionalProperties": {},
      +  "properties": {},
      +  "type": "object"
      +}
    • addedOutput schema / properties / view
      Added value: +{
      +  "type": "string"
      +}
    • changedOutput schema / required
      Previous value: -[
      -  "model",
      -  "total_articles",
      -  "filters"
      -]New value: +[
      +  "view",
      +  "model",
      +  "total_articles",
      +  "filters"
      +]
  9. Changed2 schema fields changed
    • removedInput schema / additionalProperties
      Removed value: -false
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "$schema": "http://json-schema.org/draft-07/schema#",
      +  "additionalProperties": false,
      +  "properties": {
      +    "centrality_distribution": {
      +      "additionalProperties": {
      +        "type": "number"
      +      },
      +      "propertyNames": {
      +        "type": "string"
      +      },
      +      "type": "object"
      +    },
      +    "filters": {
      +      "additionalProperties": {},
      +      "properties": {},
      +      "type": "object"
      +    },
      +    "model": {
      +      "type": "string"
      +    },
      +    "polarity_distribution": {
      +      "additionalProperties": {
      +        "type": "number"
      +      },
      +      "propertyNames": {
      +        "type": "string"
      +      },
      +      "type": "object"
      +    },
      +    "total_articles": {
      +      "type": "number"
      +    }
      +  },
      +  "required": [
      +    "model",
      +    "total_articles",
      +    "filters"
      +  ],
      +  "type": "object"
      +}
  10. First observed

TDQS

A4/5.0
Behavior4/5

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

Annotations already establish readOnly/idempotent/non-destructive, so the bar is lower, and the description still adds substantive context beyond them: it discloses that kappa results come with explicit denominators and, importantly, that labels are model interpretations rather than ground truth and that subjectivity is weak evidence requiring a caveat. That interpretive framing is real behavioral value the annotations cannot convey.

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?

Four dense sentences with no filler; the mode semantics are front-loaded after a short opening clause. The closing caveat sentence is slightly editorial but carries a genuine usage warning, so it earns its place.

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, return values need no explanation, and the description covers the distinctive behavior (aggregation modes, pairwise agreement metrics, interpretive caveat) adequately. Coverage of the many filter parameters is thin, but those are largely self-documenting in 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?

Schema coverage is only 50% across 14 parameters, so the description must compensate, and it does so for the most consequential ones: it explains the semantics of model:"all" vs "consensus" and the role of compare_models plus agreement_field in producing Cohen's and quadratic weighted kappa. The remaining filter parameters (hijri_*, keyword_mode, keyword_aliases) are left to the schema.

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?

The description gives a clear verb ('Aggregate') and resource ('AI labels over a shared selection') and explains the two headline modes, model:"all" and model:"consensus". However, it never says the tool produces a sentiment *distribution* of counts, and it does not distinguish itself from the similar-sounding siblings get_field_distribution or get_topic_distribution, so the agent must infer the distinction.

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 gives explicit conditional guidance for the mode parameters: use model:"all" to compare independent annotators and coverage, model:"consensus" for the stored panel majority, and add compare_models/agreement_field for pairwise kappa. What is missing is any guidance on when to choose this tool over siblings such as search_by_sentiment or get_field_distribution.

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.