Complete Learning Unit
complete_unitMark a learning unit as completed after the user achieves a passing score (≥50%). Awards XP, unlocks the next unit, and checks for course completion. Called automatically by learning widgets (quiz, flashcards, etc.) when the user finishes.
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": {
"unit_id": "<unit_id>",
"course_id": "<course_id>",
"score": "<score>"
},
"name": "complete_unit"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| score | Yes | The user's score (0-100). Must be ≥50 to complete the unit. | |
| unit_id | Yes | The unit ID being completed (required) | |
| course_id | Yes | The course ID containing this unit (required) | |
| learning_type | No | Type of learning activity completed (mcq, flashcard, fill_blank, match_pair, ranking, crossword, podcast, infographic) |