Skip to main content
Glama

Islam West Africa Collection (IWAC)

Rank a field's values

get_field_distribution
Read-onlyIdempotent

Rank the values of one multi-valued field across a filtered set — the direct way to answer 'which places does this coverage name most', 'who signs these articles', 'what subjects dominate'. Pipe-joined fields (subject, spatial, author, language, country) are split, so an article tagged 'Prière|Ramadan' counts once for each. Optional over_time adds the per-year share of items that carry ANY value for the field, which is how you see e.g. bylines appearing as the press professionalises.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
fieldYessubject | spatial | author | language | newspaper | country
top_nNoValues returned (default 25, max 100)
subsetNoarticles (default) | publications | 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)
date_fromNoYYYY-MM-DD (or YYYY)
newspaperNoNewspaper (articles) or periodical/series title (publications)
over_timeNoAlso return the per-year share of items carrying a value

Output Schema

TableJSON 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
    • 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"
  2. Added

TDQS

A4/5.0
Behavior4/5

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

Annotations already indicate readOnlyHint=true and idempotentHint=true, so the safety profile is clear. The description adds valuable behavioral context: pipe-joined fields are split (each value counted separately) and the over_time parameter returns per-year shares. This goes beyond what annotations provide.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is two sentences, both front-loaded with key information. The first sentence states purpose and gives clear examples; the second explains split behavior and optional over_time. No wasted words.

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 the tool's complexity (10 parameters, 1 required, output schema exists), the description covers the core functionality and key behaviors. It does not explain every parameter, but the schema and annotations handle that. Minor gap: no mention of return format, but output schema likely covers it.

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 100% with descriptions for all 10 parameters. The description adds some context (e.g., how pipe-joined fields are split, purpose of over_time), but these are largely covered by the schema descriptions. Baseline 3 is appropriate as the description does not significantly enhance parameter understanding beyond what the schema already provides.

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 ranks values of a multi-valued field across a filtered set, with concrete examples ('which places does this coverage name most'). It uses a specific verb (rank) and resource (field values), and the examples help distinguish it from siblings like get_cooccurrence or get_temporal_distribution.

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?

The description implies this is the direct way to answer certain questions, but it does not explicitly state when not to use it or mention alternative sibling tools. For example, it lacks guidance on when to use get_cooccurrence instead. This leaves room for ambiguity.

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.