Skip to main content
Glama

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault
ANKI_URLYesThe AnkiConnect base address, without /api/v1.
ANKI_API_MODEYesSet to v1 to enable the full tool set with a compatible AnkiConnect build, or legacy for the supported subset with an older add-on.
ANKI_MEDIA_IMPORT_DIRSNoAllowlisted source folder(s) for importing media from disk. Public HTTPS and base64 sources do not need this setting.
ANKI_PACKAGE_EXPORT_DIRNoAn existing, trusted absolute folder that enables local .apkg export. Requires local AnkiConnect v1.
ANKI_PACKAGE_IMPORT_DIRNoAn existing, trusted absolute folder that enables local .apkg import. Requires local AnkiConnect v1.

Instructions

Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.

This server publishes no instructions, or was last inspected before Glama recorded them.

Capabilities

Features and capabilities supported by this server

Protocol revision2025-11-25

CapabilityDetails
tools
{
  "listChanged": true
}

Tools

Functions exposed to the LLM to take actions

NameDescription
list-decksA

Lists all Anki decks with their IDs and hierarchy metadata.

create-deckA

Creates a deck or returns the existing deck with the same name. Use "::" to create nested decks.

rename-deckA

Previews a native Anki deck rename or move under an existing parent. Preserves deck and card identity, reviews descendant paths, and requires the impact hash and explicit confirmation before applying. Requires AnkiConnect v1.

list-deck-presetsB

Lists Anki deck presets and how many normal decks use each one. Requires AnkiConnect v1.

get-deck-presetA

Reads a deck preset's settings and the decks that use it. Pass a preset ID or a normal deck ID. Requires AnkiConnect v1.

create-deck-presetA

Creates an unassigned deck preset from native defaults or an existing preset. Does not replace or assign a preset. Requires AnkiConnect v1.

update-deck-presetA

Previews a preset rename or a patch to learning, display order, or audio options, showing every deck using it. Requires an impact hash and explicit confirmation to apply. Does not request full FSRS rescheduling. Requires AnkiConnect v1.

assign-deck-presetA

Previews assigning a preset to explicitly selected normal decks, without adding descendants or requesting full FSRS rescheduling. Requires an impact hash and explicit confirmation. Requires AnkiConnect v1.

delete-deck-presetA

Previews deletion of one unused, non-Default deck preset. Never reassigns decks automatically. Requires an impact hash and explicit confirmation. Requires AnkiConnect v1.

get-deck-statsA

Returns scheduler counts for selected decks, or for all decks when no names are provided. Fails if a requested deck does not exist.

get-card-decksB

Groups the specified card IDs by their current deck.

move-cards-to-deckA

Moves cards to another deck. Creates the target deck if it does not exist and removes the cards from filtered decks before moving them.

delete-deck-and-cardsA

Previews deletion of one normal deck and all descendants. Applying requires dryRun: false, the reviewed impactHash as expectedImpactHash, and confirmDeletion: true. Changed deck identities, Card placement, or Note data block deletion. Default/filtered decks, borrowed-out Cards, incomplete data, and excessive impact are blocked. Surviving sibling Cards in other decks are preserved and verified. No backup or rollback is created.

search-cardsA

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.

get-card-detailsA

Returns note fields and normalized scheduling information for specific cards. Reports missing IDs separately.

get-card-review-historyB

Returns the most recent review events for up to 20 cards, with ratings and intervals converted into readable values.

get-card-previewA

Returns Anki-rendered HTML, shared CSS, and standalone static HTML documents for one existing card. Supports front/back and light/dark inspection without changing Anki. Not a screenshot: JavaScript, navigation, media, and external resources are disabled in documents. Raw source is untrusted.

predict-card-intervalsA

Read-only scheduler predictions for Again, Hard, Good, and Easy on one card. Returns Anki's labels and interval amounts, not an exact due time or eligibility to review. Does not answer the card, change scheduling, or use custom states from the GUI reviewer. Requires AnkiConnect v1.

get-card-due-statusA

Checks one card's due time and per-card scheduling eligibility in Anki, optionally including learn-ahead. New cards can be available without being due. Does not account for daily deck limits, promise the card will be shown next, or change Anki. Requires AnkiConnect v1.

set-card-suspensionA

Suspends or unsuspends existing cards and verifies their saved suspension state. Missing Cards block the whole selection. Suspended cards do not appear during normal reviews.

set-card-flagA

Applies one of Anki's supported flag colors and verifies saved flags without exposing arbitrary internal card fields. Missing Cards block the whole selection; a write error stops later writes and may leave partial progress.

reschedule-cardsA

Changes due dates and verifies the saved review state and requested date range using Anki's native search. Missing Cards block the whole selection. New cards become review cards, and ranges choose a random due date; never blindly retry after an error.

reset-cards-to-newA

Resets scheduling and verifies the saved New state. Missing Cards block the whole selection. Anki may log the reset; review history and repetition counts are not promised to be erased. Never blindly retry after an error.

start-card-relearningA

Starts relearning for active Review cards and verifies the result. Current AnkiConnect may implement this as an Again answer, adding review history and changing repetitions/lapses. Cards may return directly to Review or be suspended by leech settings. Missing/non-Review Cards block the whole selection. Not idempotent; never blindly retry.

list-note-typesA

Lists the Anki note types available for creating notes, including their model IDs.

get-note-type-schemaA

Returns ordered fields, the Browser sort field (v1), card-template field usage, and a field-order revision hash for one Anki note type. Use this before creating notes or changing fields.

get-note-type-designA

Returns the editable front/back HTML, shared CSS, fields, and revision hash for one Anki note type. Use this before proposing design changes.

clone-note-typeA

Creates an independent note type with the source's ordered fields, card template HTML, and shared CSS. In AnkiConnect v1 it preserves the Browser sort field and requires the reviewed clone hash before applying. Does not copy notes or cards.

create-note-typeA

Creates a new Normal or Cloze note type from ordered fields, complete card templates, and shared CSS. Optionally selects its Browser sort field in AnkiConnect v1. Defaults to dry-run mode and does not create notes or cards.

rename-note-typeA

Previews renaming an existing Note Type by ID. Changes only the type name, not fields, templates, Notes, or Cards. Applying requires the reviewed impact hash and explicit confirmation. Requires AnkiConnect v1.

set-note-type-sort-fieldA

Previews changing which field supplies the Anki Browser's Sort Field column for an existing Note Type. Does not reorder fields, edit templates, or change review scheduling. Applying requires the reviewed impact hash and explicit confirmation. Requires AnkiConnect v1.

delete-unused-note-typeA

Previews deleting one explicitly selected Note Type. Refuses if any Note uses the type, even without Cards, or if it is the last Note Type. Requires the reviewed impact hash and explicit confirmation to apply. Requires AnkiConnect v1.

add-note-type-fieldA

Adds an empty field to every note of one note type. Defaults to dry-run mode and does not add the field to card templates.

rename-note-type-fieldA

Renames a field across every note of one note type while preserving its values. Anki updates template references to the renamed field.

reposition-note-type-fieldA

Moves a note-type field to a new zero-based order while preserving all note values. Defaults to dry-run mode.

delete-note-type-fieldA

Permanently deletes one field and all of its values from every note of a note type. Requires a dry-run impact review, current schema hash, unchanged non-empty note count, and explicit data-loss confirmation.

add-note-type-templateA

Adds a new card template to a Normal note type. Defaults to dry-run mode and reports how many existing notes may generate a new card.

rename-note-type-templateA

Renames one card template without changing its order, HTML, generated cards, or review history. Defaults to dry-run mode.

reposition-note-type-templateA

Moves one card template to a new zero-based order while preserving its HTML and existing card history. Defaults to dry-run mode.

delete-note-type-templateA

Permanently deletes one card template and every card generated from it. Reports notes that may lose their last card and requires explicit impact confirmation.

update-note-type-stylingA

Validates and replaces the CSS shared by every card of one note type. Defaults to dry-run mode; applying requires expectedDesignHash. Reports applied only after reading back the exact CSS and confirming the Note Type identity and unchanged templates. A write/readback error may follow an applied change; do not blindly retry.

update-note-type-templatesA

Validates and replaces selected front/back HTML templates for one note type. Defaults to dry-run mode and applies all requested sides in one Anki undo step.

replace-note-type-textA

Previews and validates a case-sensitive literal replacement in explicitly selected Note Types' front HTML, back HTML, and/or CSS. Does not replace Note field values. Applying requires AnkiConnect v1, a current impact hash, and explicit confirmation.

search-notesB

Searches notes with Anki's native query syntax. In v1 mode, defaults to a native page with a continuation cursor. Request pagination: offset for an exact total or a numeric position.

find-empty-notesA

Read-only AnkiConnect v1 scan for Notes with no Cards, empty fields, or empty questions. Returns one page of candidates for review. This tool never deletes anything.

get-note-detailsA

Returns complete ordered fields with per-field hashes, tags, note type, modification time, and generated card IDs. Use fields[name].hash as expectedFieldHashes[name] when updating fields.

validate-note-draftsA

Checks candidate notes without creating them. Validates decks, note types, field names, existing media references, empty-card rules, and Anki duplicate rules.

create-notesA

Validates the complete batch before creating Notes, optionally merging existing media references. Returns a status for every input and preserves acknowledged IDs if readback fails. A null createdNoteCount means an unknown creation outcome; null cardIds means unverified readback. Partial/unknown outcomes are errors with structured results. Never blindly resend the whole batch; duplicate checks are not idempotency. No automatic retry or rollback.

update-note-fieldsA

Previews partial field patches by default. To apply, set dryRun to false and provide expectedFieldHashes for every submitted field from get-note-details or a dry run. Validates the complete batch before writing and verifies saved values. Each submitted field replaces its complete value, including HTML.

convert-notes-to-note-typeA

Previews moving explicit existing Notes to another Normal Note Type. Review target-to-source field and template maps, preserved/removed Card IDs, and possible new Cards. Apply only with the reviewed hash and confirmations. Does not duplicate Notes. Requires AnkiConnect v1.

edit-note-tagsA

Adds and removes selected tags on existing notes without replacing their complete tag lists.

replace-note-tagA

Previews replacing one whole tag on explicit Note IDs. Notes without the source tag are skipped. Does not recursively rename child tags, change unrelated tags, or apply to the whole collection. Requires AnkiConnect v1 and explicit confirmation of the reviewed preview to write.

list-tagsB

Lists a bounded page of tags from the current Anki collection, optionally filtered by prefix.

delete-unused-tagsA

Previews and removes tag registrations that no Note uses in the active collection. Does not remove tags from Notes or delete Notes or Cards. Requires AnkiConnect v1 and confirmation of the reviewed preview.

delete-notes-and-cardsA

Previews deletion of explicit Note IDs and all their generated Cards. Defaults to dryRun. Applying requires the reviewed impactHash as expectedImpactHash and confirmDeletion: true. Missing Notes or changed profile, Note content, tags, or Card IDs block the entire batch. Successful deletion is verified with native searches. No backup or rollback is created.

search-media-filesB

Returns a bounded, sorted page of filenames from Anki's current collection.media folder.

get-media-fileA

Returns verified metadata for one exact Anki media file and can include a bounded image or audio preview.

store-media-fileB

Safely imports bounded media bytes into Anki from base64, a public HTTPS URL, or an explicitly allowed local directory. Existing files are never overwritten.

find-media-referencesA

Scans note fields, Card Template HTML, and note-type CSS for exact references to one Anki media filename. Complete scans return a fingerprint for safe deletion. CSS parsing failures are reported separately and make counts incomplete; no fingerprint is issued.

attach-media-to-notesA

Safely appends or prepends references to existing Anki media without replacing unrelated note-field HTML. Defaults to dry-run mode.

detach-media-from-notesA

Removes exact image or sound references from selected note fields without deleting the media file. Defaults to dry-run mode.

delete-media-fileA

Previews exact Note, Card Template, and CSS references before moving one media file to Anki's media trash. Applying requires the reviewed file hash, reference count, reference fingerprint, and explicit confirmation. Incomplete Note or CSS scans block deletion even with confirmations enabled.

get-study-statsA

Reads collection-wide review counts for Anki's current study day and recent days with reviews. Does not change data or include per-deck counts.

get-study-summaryA

Read-only structured Anki totals for the whole collection or one deck including its subdecks. Returns card and linked-note counts, recorded answers and time across available history, and current card categories. For today's workload use get-deck-stats. Requires AnkiConnect v1.

export-deck-packageA

Previews a local .apkg export of one normal deck and its subdecks. Media is included; scheduling is opt-in. On confirmation, writes a new file under the configured export directory without overwriting existing files. Requires local AnkiConnect v1.

import-deck-packageA

Previews a trusted local .apkg file and imports its reviewed bytes into the active Anki collection. Anki can update existing Notes and merge Note Types; it imports scheduling and deck presets when present. Preview does not calculate a collection diff. Requires local AnkiConnect v1.

get-collection-infoA

Read the active profile, scheduler, and opaque collection session. Does not read Notes or Cards. Requires AnkiConnect v1.

refresh-collectionA

Refresh open Anki windows, optionally clearing the supported Note Type cache first. Does not reopen the collection, sync, or repair data. Requires AnkiConnect v1.

sync-collectionA

Preview or explicitly confirm a sync with Anki's configured server. A full sync may require the user to choose Upload or Download in Anki. Returns an operation ID, not completion. Requires AnkiConnect v1.

check-collection-integrityA

Preview or explicitly confirm Anki's native Check Database operation. It can repair data and clear the Undo history; the preview does not check the database. Requires AnkiConnect v1.

undo-collection-actionA

Preview or explicitly confirm a single native Undo. AnkiConnect cannot preview or select the undo entry; Undo can revert a manual action, not necessarily a change made through MCP. Never use it as automatic rollback. Requires AnkiConnect v1.

get-collection-operationA

Check a submitted sync, database check, or Undo without starting another. If waitingForUser, use Anki's UI and check the same operation ID again. Requires AnkiConnect v1.

cancel-collection-operationA

When the user asks to stop a sync, database check, or Undo, request cancellation of its operation ID from this running MCP server. Anki may refuse to stop a running operation. Acknowledgement is not completion or rollback; check get-collection-operation. Requires AnkiConnect v1.

Prompts

Interactive templates invoked by user choice

NameDescription

No prompts

Resources

Contextual data attached and managed by the client

NameDescription

No resources

TDQS

A3.6/5.0

Scored across 73 tools

Disambiguation4/5

Most tools target clearly distinct resource/action pairs, and the descriptions sharply define boundaries for risky write operations. A few clusters still invite hesitation, especially get-deck-stats vs get-study-stats vs get-study-summary, and the several note-type HTML/CSS update tools.

Naming Consistency5/5

Tool names consistently use lowercase kebab-case with a verb_noun pattern such as list-decks, create-deck, get-card-details, and delete-media-file. The few variations like find-empty-notes remain predictable and readable.

Tool Count2/5

Seventy-three tools is far beyond a typical manageable MCP surface and creates substantial cognitive load. Anki is a broad domain and many tools are genuinely distinct, but the set is still heavily over-scoped.

Completeness5/5

The surface covers decks, presets, cards, notes, note types, fields, templates, tags, media, stats, export/import, sync, integrity, and undo operations. It is exceptionally complete for Anki collection management, with no obvious lifecycle dead ends.

Maintenance

ActivityMaintained
ResponsivenessNo recent community issues