Search cards
search-cardsSearch Anki cards with native query syntax, then page results by cursor or offset to get exact totals or jump to a numeric position.
Instructions
Searches cards with Anki's native query syntax. In v1 mode, defaults to a native cursor page. Request pagination: offset for an exact total or a numeric position.
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": "search-cards"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | ||
| query | Yes | Native Anki search query, for example "deck:French is:due", "tag:verb", or "prop:lapses>3". An empty query searches all cards. | |
| cursor | No | Use the previous nextCursor with the same query and limit. Omit it on the first cursor page. | |
| offset | No | Supplying an offset, even 0, selects offset mode unless pagination is explicit. | |
| pagination | No | Defaults to cursor when v1 is enabled and no offset is supplied. Use offset for an exact total or a numeric position. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| cards | Yes | ||
| query | Yes | ||
| total | Yes | Exact count in offset mode; null in cursor mode. | |
| offset | Yes | Numeric offset; null in cursor mode. | |
| hasMore | Yes | ||
| returned | Yes | ||
| nextCursor | No | Present in cursor mode. Null means the search is complete. | |
| missingCardIds | Yes |