Skip to main content
Glama

Study session and scheduling

study_session
Destructive

Find due Anki cards and update review state—answer, suspend, unsuspend, reset, or relearn—to run quizzes or adjust scheduling.

Instructions

Find due cards and change review state (answer, suspend, unsuspend, reset, relearn) in the local Anki collection. Use this to run a quiz or adjust scheduling; use manage_flashcards to edit card content and get_analytics for history and statistics.

Operations:

  • find_due: read-only. Needs query (Anki search syntax, e.g. "deck:Spanish"); returns which matching cards are due now.

  • check_status: read-only. Needs cardIds; returns due/suspended flags per card.

  • answer: records reviews, as if answered in Anki. Needs answers: [{ cardId, ease }] where ease 1=Again, 2=Hard, 3=Good, 4=Easy. Affects future scheduling.

  • suspend / unsuspend: needs cardIds OR query. Suspended cards are excluded from reviews until unsuspended (e.g. pause a whole deck: query 'deck:"Spanish"').

  • forget: needs cardIds OR query. Resets cards to new, discarding their review progress (destructive).

  • relearn: needs cardIds OR query. Puts cards back into relearning. With query (Anki search syntax), the server finds the cards and applies the change in chunks, so thousands of cards take one call; it returns the count. dryRun: true returns the match count and sample IDs without writing. A query matching nothing changes nothing.

All writes apply immediately and are not undoable through this tool.

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": {
      "operation": "<operation>"
    },
    "name": "study_session"
  }
}

Input Schema

NameRequiredDescriptionDefault
queryNofind_due (required), or suspend/unsuspend/forget/relearn instead of cardIds: Anki search query, e.g. 'deck:"Spanish"' or "tag:verbs is:due". The server finds the cards, so thousands of cards work in one call
dryRunNosuspend/unsuspend/forget/relearn: report how many cards match (and sample IDs) without changing anything. Rejected for other operations
answersNoanswer: one entry per reviewed card
cardIdsNocheck_status (required), or suspend/unsuspend/forget/relearn instead of query: card IDs (not note IDs)
operationYesWhich operation to run; see the tool description for required parameters

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changedv1.3.0
    • changedInput schema / properties / cardIds / description
      Previous value: -"check_status/suspend/unsuspend/forget/relearn: card IDs (not note IDs)"New value: +"check_status (required), or suspend/unsuspend/forget/relearn instead of query: card IDs (not note IDs)"
    • addedInput schema / properties / dryRun
      Added value: +{
      +  "description": "suspend/unsuspend/forget/relearn: report how many cards match (and sample IDs) without changing anything. Rejected for other operations",
      +  "type": "boolean"
      +}
    • changedInput schema / properties / query / description
      Previous value: -"find_due: Anki search query, e.g. \"deck:Spanish\" or \"tag:verbs\""New value: +"find_due (required), or suspend/unsuspend/forget/relearn instead of cardIds: Anki search query, e.g. 'deck:\"Spanish\"' or \"tag:verbs is:due\". The server finds the cards, so thousands of cards work in one call"
  2. Changed8 schema fields changedv0.7.0
    • changedInput schema / $schema
      Previous value: -"http://json-schema.org/draft-07/schema#"New value: +"https://json-schema.org/draft/2020-12/schema"
    • removedInput schema / additionalProperties
      Removed value: -false
    • changedInput schema / properties / answers / description
      Previous value: -"Card answers (for answer operation)"New value: +"answer: one entry per reviewed card"
    • removedInput schema / properties / answers / items / additionalProperties
      Removed value: -false
    • changedInput schema / properties / cardIds / description
      Previous value: -"Card IDs to operate on"New value: +"check_status/suspend/unsuspend/forget/relearn: card IDs (not note IDs)"
    • removedInput schema / properties / days
      Removed value: -{
      -  "description": "Days from today for due date (for reschedule)",
      -  "type": "string"
      -}
    • changedInput schema / properties / operation / description
      Previous value: -"Study session operation"New value: +"Which operation to run; see the tool description for required parameters"
    • changedInput schema / properties / query / description
      Previous value: -"Search query to find cards (for find_due)"New value: +"find_due: Anki search query, e.g. \"deck:Spanish\" or \"tag:verbs\""
  3. Addedv1.0.0

TDQS

A4.8/5.0
Behavior5/5

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

Goes well beyond the annotations: it labels which operations are read-only versus mutating, states that forget discards review progress, that suspended cards are excluded from reviews, that answer affects future scheduling, that batch writes are chunked server-side, that a non-matching query is a no-op, and that all writes apply immediately and are not undoable through this tool. This is exactly the extra context destructiveHint=true alone cannot convey.

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

Conciseness4/5

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

Front-loaded summary followed by a scannable per-operation bullet list, closed with the batch/dryRun paragraph and the non-undoable warning. Dense and purposeful, though the per-operation requirement clauses overlap with what the schema descriptions already state.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

A seven-operation tool with destructive batching is fully covered: each operation's inputs and effects are stated, return values are described in prose (due flags, match counts, sample IDs) in lieu of an output schema, and the dryRun safety path is documented. Nothing an agent needs to call it correctly appears missing.

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

Parameters4/5

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

Schema coverage is 100%, so the baseline is 3; the description still adds operational meaning, e.g. what query actually does (server resolves cards and applies changes in chunks), the 'pause a whole deck' example, and the OR-relationship between cardIds and query per operation. It largely restates the schema's per-parameter text, which caps it below 5.

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

Purpose5/5

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

Opens with a specific verb pair and resource ('Find due cards and change review state ... in the local Anki collection') and then enumerates all seven operations with what each does. It also names the two siblings that cover adjacent concerns, so an agent can place it immediately in the toolset.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Explicit routing guidance: 'Use this to run a quiz or adjust scheduling; use manage_flashcards to edit card content and get_analytics for history and statistics.' Per-operation requirements (cardIds OR query, answers shape) and the dryRun preview path make the when/how unambiguous.

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