Skip to main content
Glama
anki-connect-mcp
by SolarianGG

collection.refresh

collection_refresh

Refresh 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

NameRequiredDescriptionDefault
targetNo`windows` refreshes open windows; `cachesAndWindows` also invalidates supported collection caches first.windows
sessionNoOptional. 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.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4/5.0
Behavior4/5

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

Annotations only declare the coarse safety profile (readOnlyHint=false, destructiveHint=false, openWorldHint=false); the description adds undo semantics ('Undo: none'), a completion state, and the enumerated error set (collectionUnavailable, internalError, invalidParams, staleSession). It also bounds the effect by stating what state it deliberately does not repair, which is behavior an agent could not infer from annotations.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The effect statement is front-loaded in sentence one, followed by the non-effects, then the compact metadata lines. Every element earns its place; the 'Scope/Effect/Completion/Undo' shorthand is dense rather than verbose.

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?

For a two-optional-parameter, no-output-schema maintenance tool, the definition covers effect, non-effects, undo, and failure modes, which is essentially everything needed to invoke it correctly. Only a hint about what the caller observes after a successful refresh is absent, and that is minor.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100% and both parameters already carry thorough descriptions, including the enum meanings and the session/staleSession rationale. The description restates the cache invalidation behavior ('optionally invalidating supported collection caches first') but adds no format, default, or interaction detail beyond the schema, so the baseline 3 applies.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The first sentence gives a concrete verb plus object ('Refresh windows, optionally invalidating supported collection caches first'), and the scope/effect line pins it to the collection domain. It is clearly distinct from write-oriented siblings such as collection_sync or collection_checkIntegrity, though it never explicitly names a sibling to avoid.

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?

It supplies real negative guidance: it 'does not close/reopen the collection and does not repair invalid scheduling state', which steers an agent away from using it to fix broken views or scheduling. It stops short of naming an alternative tool for those cases, so there is no explicit when-to-use-this-instead routing.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Deploy Server

Other Tools