---
summary: "openalex_analyze_trends: order parameter, count-desc default, cursor fix, truncation notice"
breaking: false
security: false
---

# 0.6.20 — 2026-06-04

## Added

- **`openalex_analyze_trends`** — new `order` input field (`"count"` | `"key"`). `"count"` (default) returns the top-N groups by count descending; `"key"` enumerates all distinct values in key-ascending order with cursor pagination. ([#37](https://github.com/cyanheads/openalex-mcp-server/issues/37))
- **`openalex_analyze_trends`** — truncation notice via `ctx.enrich.notice` when `groups.length === per_page`: reports the smallest shown count and advises narrowing with filters, raising `per_page`, or switching to `order: "key"` for full enumeration.

## Fixed

- **`analyze()`** — first-page group-by requests no longer send `cursor=*` unconditionally. Count-descending mode (default) omits the cursor so OpenAlex returns groups ranked by count; `cursor=*` is now reserved for `order: "key"` (key-ascending full enumeration). This makes `per_page` a real top-N knob and removes the regression introduced by #23. ([#37](https://github.com/cyanheads/openalex-mcp-server/issues/37))
