Skip to main content
Glama

Islam West Africa Collection (IWAC)

Rank a field's values

get_field_distribution
Read-onlyIdempotent

Rank exact metadata values, splitting pipe-separated tags. Reports missing metadata and optional coverage over time. Choose spatial for mentioned places, country for stored country tags, or subject/author/language.

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": {
      "field": "<field>"
    },
    "name": "get_field_distribution"
  }
}

Input Schema

NameRequiredDescriptionDefault
exactNoAND values. Fields: subject/spatial/author/language/country/newspaper/topic_id/min_prob/scored_by; country_raw=whole cell; polarity:<model>.
fieldYessubject | spatial | author | language | newspaper | country
top_nNoValues returned (default 25, max 100)
subsetNoarticles (default) | publications | references
countryNoExact country name (accents optional)
date_toNo
keywordNo
subjectNoExact tag
date_fromNoInclusive date bounds: YYYY[-MM[-DD]]
newspaperNoNewspaper/periodical substring
over_timeNoAlso return the per-year share of items carrying a value
hijri_yearNo
hijri_monthNo
keyword_modeNoliteral: the whole keyword as one substring
keyword_aliasesNo

Output Schema

NameRequiredDescriptionDefault
noteNo
viewYes
fieldYes
subsetYes
valuesYes
filtersYes
other_valuesNo
total_matchesYes
distinct_valuesYes
coverage_by_yearNo
items_with_valueYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changed
    • addedInput schema / additionalProperties
      Added value: +false
    • addedInput schema / properties / keyword_mode / description
      Added value: +"literal: the whole keyword as one substring"
  2. 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
  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

B3.4/5.0
Behavior3/5

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

Annotations already declare this a read-only, idempotent, closed-world operation, so the safety bar is low. The description usefully adds that pipe-separated tags are split and that missing metadata is reported, plus that coverage over time is optional via over_time. It says nothing about how 'exact' AND-filters, keyword_mode, or subset change results, leaving substantial behavioral surface undocumented for a 15-parameter tool.

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 short sentences, front-loaded with the core operation before the field-selection advice. No filler or restatement of the title. Slightly compressed to the point of terseness in the final sentence.

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?

An output schema exists, so return values needn't be explained, and annotations cover safety. But for a 15-parameter tool with a nested 'exact' object and multiple filter modes, the description omits how filtering interacts with ranking and what the coverage-over-time output looks like. Adequate but with clear gaps.

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 67%, so baseline is 3. The description clarifies that values are ranked and that tags are split on pipes, and it hints at field semantics, but it adds no meaning for 'exact' AND semantics, 'top_n' ranking basis, 'subset' scopes, or 'keyword_mode' beyond what the schema already states.

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?

States a specific verb and resource: ranks exact metadata values from a chosen field, with pipe-separated tag splitting. It also distinguishes the 'field' choices (spatial vs country vs subject/author/language), which helps separate it from related distribution tools. It never explicitly names the sibling distribution tools it competes with, so it stops short of a 5.

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?

Gives conditional guidance on field selection ('spatial for mentioned places, country for stored country tags'), which is genuinely useful because those map to other tools. However it never names alternatives like get_place_distribution, get_country_comparison, or get_topic_distribution, and gives no guidance on when NOT to use this tool.

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.