collection.refresh
collection_refreshRefresh open Anki windows, optionally invalidating supported collection caches first, so the UI reflects current collection data without closing or reopening the collection.
Instructions
Refresh windows, optionally invalidating supported collection caches first.
Does not close/reopen the collection and does not repair invalid scheduling state.
Anki-Connect method collection.refresh. Scope: collection. Effect: refresh. Completion: completed. Undo: none.
Possible errors: collectionUnavailable, internalError, invalidParams, staleSession.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "collection_refresh"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| target | No | `windows` refreshes open windows; `cachesAndWindows` also invalidates supported collection caches first. | windows |
| session | No | Optional. Collection session ID: the `session` field returned by `collection_get`. Usually omit it — the server then uses the session current at the time of the call. Pass it to make the call fail with `staleSession` instead of acting on a different profile/collection than the one your IDs, cursors and tokens came from. |