Summarize the paper catalogue
aggregate_papersGroup-by count of papers across one or two axes. Single axis: set groupByPrimary to 'compound' | 'topic' | 'journal' | 'year' | 'studyDesign'. Two axes: also set groupBySecondary (e.g. groupByPrimary='compound', groupBySecondary='year') for a 2D matrix — perfect for 'how research per compound has evolved over time'. Returns ranked buckets with sample citations. 1D buckets: {key, label, count, sample}. 2D buckets: {rowKey, rowLabel, colKey, colLabel, count, sample}. Same supported filter shape as search_papers, including accessTypes; filters are optional. Paper aggregates use the primary query pattern only; ordinary search_papers may relax after a miss. With relevantInfluential, title-or-summary eligibility matches search/count. When hitCap is true, disclose that bucket counts cover only matchedFetched of total papers and are not exhaustive.
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": {
"filters": "<filters>",
"groupByPrimary": "<groupByPrimary>"
},
"name": "aggregate_papers"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| filters | Yes | Same supported filter shape as search_papers, except linkedTrialRegistrationNumbers. Filters are OPTIONAL for aggregates — pass `{}` to group across all papers. `limit` is ignored. | |
| groupByPrimary | Yes | Primary axis to group by ("compound" | "topic" | "journal" | "year" | "studyDesign"). Required. | |
| groupBySecondary | No | Optional second axis for a 2D matrix (e.g. "compound × year"). Result has rowKey/colKey/count cells; caps at 50 buckets after sort. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |