Skip to main content
Glama

Aggregations over the matching components

research_facets
Read-onlyIdempotent

The cheap exploration call (2 tokens): what labels, papers, states, years and terms the matching set holds, as flat or nested (depth 2) facets; returns no hits. Example: {"query": {"filters": {"start_date": "1832-06-01", "end_date": "1832-12-31"}, "text": {"must_have_keywords": "cholera"}, "flat_facets": ["states", "month_histogram"]}}. Everything under one query key; text matching under text as strings; term_filters / any_of are lists of {"field": ..., "values": [...]} objects; an unknown key is an uncharged 422 with a hint. Facets count matches, not a ranking: anchor with must_have_phrase or must_have_keywords and filters; should_* and semantic_text only widen. At least one of flat_facets / nested_facets is required. The presets (label counts, place x era coverage, hotspots, a field census) are in research_guide section "api".

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": {
      "query": "<query>"
    },
    "name": "research_facets"
  }
}

Input Schema

NameRequiredDescriptionDefault
queryYesAggregations only, no hits: the cheap exploration call. Facets count every MATCHING doc, not a ranking — anchor with must_have_* / phrase filters; should_have_* and semantic_text only widen the match set.

Output Schema

NameRequiredDescriptionDefault
modeYesWhat matched: keywords (must_/should_ words and phrases only, BM25), semantic (semantic_text only: meaning over the embedded narrative genres), hybrid (both, fused - semantic_text has WIDENED the keyword match to similar-sounding material), none (filters only). Counts and hits are of that match, not of the topic.
corpusYes
facetsYes
total_docsYes
tokens_chargedYesWhat this call cost
tokens_remainingYesYour balance after it
total_componentsYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.5/5.0
Behavior5/5

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

Annotations already cover safety (readOnly, idempotent, non-destructive), and the description adds behavior the annotations cannot: cost (2 tokens), no hits returned, facets count matches rather than ranking, and unknown keys produce an 'uncharged 422 with a hint'. That is unusually rich operational context for a read-only 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?

Front-loaded with the key distinction (cheap, no hits) and each sentence carries a distinct rule — cost, query shape, facet requirement, anchoring semantics, presets pointer. The inline JSON example costs some length but replaces several sentences of explanation, 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?

An output schema exists, so return shapes need not be explained, and the description still flags 'returns no hits' and where presets live. Remaining omissions (facet_size behavior, nested depth limits) are documented in the schema, so nothing critical for a correct call is missing.

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 100%, so the baseline would be 3, but the description adds genuinely useful shape rules the agent must follow: 'Everything under one query key; text matching under text as strings; term_filters / any_of are lists of {field, values} objects', plus a full worked example query. It also explains why anchoring matters for facet counts, which the schema cannot convey.

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?

States a specific verb+resource — aggregations (facets) over the matching component set — and explicitly contrasts with hit-returning tools: 'returns no hits' and 'The cheap exploration call (2 tokens)'. An agent can tell this apart from research_search/research_components without opening a schema.

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?

Gives concrete when-to-use guidance: 'anchor with must_have_phrase or must_have_keywords and filters; should_* and semantic_text only widen', plus a hard requirement that at least one of flat_facets / nested_facets be present, and a pointer to research_guide section 'api' for presets. It stops short of naming a sibling to use when you actually want hits, leaving that inference to the agent.

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.

Resources