add_vocabulary_items
ChatGPTSaves new words to the user's NextLang vocabulary for one language pair, so they join the spaced-repetition schedule. Use when the user asks to save or add words, for example from a text you discussed. Put each word in 'term' in the language being learned and its meaning in 'translation'; add a short example sentence when it helps. Words the user already has are skipped, not duplicated. Returns how many were added, already saved, or invalid. This is NextLang's own review list, quizzed through list_due_words and record_review, not a flashcard deck: when the user wants a deck to study in Anki, Quizlet, Mochi or Brainscape, use save_deck instead.
expand_deck
ChatGPTAdds new cards to one of the user's existing NextLang decks, avoiding cards it already has. Costs 1 credit: confirm first unless the user explicitly asked. Get deckId and platform from list_decks. Returns how many cards were added, the new total and the remaining credits.
generate_deck
ChatGPTGenerates a new flashcard deck with NextLang's own generator and saves it to the user's account. Costs 1 credit: unless the user explicitly asked for a new deck, confirm first. A tentative request ('maybe make me a deck', 'could we do one about...') is not an explicit one: confirm first. Cards are built from 'prompt' (a topic, a situation or a short text of up to 500 characters); the front of each card is in learningLanguage. It makes basic front/back cards only: cloze (fill-in-the-blank) decks are made on the NextLang website, so do not promise cloze cards from this tool. Returns the cards, a link to the deck on NextLang (the user downloads and studies it there) and the remaining credits. For Quizlet and Brainscape, send the user to that link to import: its Copy button keeps the exact separators, which copying from a chat often turns into spaces. Offer the cards as text only as a fallback. Do not call get_credits first: when the balance is too low this tool says so and returns a link explaining credits. If this call fails or times out, call list_decks before trying again: the deck may already exist, and generating again spends another credit.
get_credits
ChatGPTReturns the user's NextLang credit balance, whether they are premium, and freeCreditsRenewAt: when the balance is topped back up to 5 free credits, or null when the balance is already 5 or more and nothing will renew. When the balance is too low for what the user wants, say so and give them plansUrl, a page explaining credits and Premium; do not push a purchase. Each deck generation or expansion costs 1 credit.
get_deck
ChatGPTReturns the cards of one of the user's decks and its link on NextLang. Get deckId and platform from list_decks.
get_deck_file
ChatGPTReturns a download link for one of the user's decks as a file to import: .apkg for Anki, .mochi for Mochi, with audio when it can be generated. Premium only; call it directly, without checking get_credits first, since a non-premium account gets a clear message with a link explaining Premium. The link works for one hour: show it to the user exactly as returned, and call this tool again for a fresh link. Quizlet and Brainscape import text, so for them give the deck link from list_decks or get_deck: its Copy button keeps the exact separators. Show the cards as text only as a fallback.
list_decks
ChatGPTLists the user's most recent NextLang decks, newest first, with each deck's language pair and link, plus total: how many decks match the filters in all, beyond the listed ones. Answer "how many decks" questions from total and filter by learningLanguage or translationLanguage instead of opening decks one by one. To find a deck the user names ("the kitchen deck"), pass part of its name as query: older decks are only reachable that way. Use it to find a deck to show or expand, and after a failed generate_deck call to check whether the deck was created anyway.
list_due_words
ChatGPTUse when the user wants to review, practise or be quizzed on their NextLang vocabulary. Call without a language pair first to see which dictionaries exist and how many words are due, then call with the pair. Called without a pair it also answers which languages the user is learning: it lists every dictionary with its language pair and word counts. A dictionary is identified by its pair, not by quiz direction: 'term' is always in learningLanguage and 'translation' in translationLanguage, and you can quiz either way (show the term and ask for the translation, or the reverse) from the same dictionary. When dueTotal is 0 and the user still wants to practise, call again with mode 'all' instead of switching to another dictionary; nextDueAt tells when scheduled review resumes. Do not reveal the answer until the user replies. After the round, save results with record_review. New words are capped per dictionary per day by the learner's New/day setting; due reviews come first.
record_review
ChatGPTSaves a quiz round to the user's spaced-repetition schedule. Call once at the end of every round with every word asked, not after each word. This applies to practice rounds too (mode 'all'): like the NextLang site's Review all, extra practice still updates the schedule, so never offer a round that is not recorded. Use 'known' only when the user recalled the word without a hint; 'unknown' brings the word back the next day. Returns each word's next due date and whether it now counts as learned (next review 21 days or more away).
save_deck
ChatGPTSaves flashcards that the user provided or that you wrote together as a deck in the user's NextLang account, for free (no credits). Use it to turn a word list, a table or an export the user pasted into a deck. Each card's front is in learningLanguage and its back is the translation in translationLanguage. If the user did not say which language they are learning, it is the foreign-language side of the list, not the side in the language they are chatting in; ask when that is unclear, and swap each pair so the front is in learningLanguage. Repeated fronts are dropped and reported as skipped. For an .apkg (Anki) or .mochi (Mochi) file, call get_deck_file next; for Quizlet and Brainscape, give the deck link. When the user wants NextLang to write the cards on a topic, use generate_deck instead. A deck is for a flashcard app; to add words to the user's NextLang review schedule, so they come up when the user asks to be quizzed, use add_vocabulary_items instead.
search_vocabulary
ChatGPTFinds words in the user's NextLang dictionaries by a fragment of the term or its translation. Matching ignores case and diacritics. Call this before telling the user a word is not in their vocabulary.