Skip to main content
Glama

Complete Learning Unit

complete_unit
Idempotent

Mark 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

NameRequiredDescriptionDefault
scoreYesThe user's score (0-100). Must be ≥50 to complete the unit.
unit_idYesThe unit ID being completed (required)
course_idYesThe course ID containing this unit (required)
learning_typeNoType of learning activity completed (mcq, flashcard, fill_blank, match_pair, ranking, crossword, podcast, infographic)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.2/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=false, idempotentHint=true, and destructiveHint=false, so the safety profile is covered. The description adds real value beyond that by disclosing the side effects (XP award, unit unlock, course-completion check) and the automatic-caller relationship. It does not say what happens on a sub-50% call (error vs. no-op), which is the main remaining gap.

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?

Two tight sentences with the action and effects front-loaded and the caller context last. No redundant or filler wording.

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?

With no output schema, the description usefully summarizes the observable outcomes (XP, unlock, completion check) an agent would otherwise have to guess. It is nearly complete for a 4-param mutation tool, missing only failure-mode behavior for scores below 50.

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 description coverage is 100%, so all four parameters are already documented, including the ≥50 constraint on score. The description restates the passing threshold but adds no new syntax or format detail beyond the schema, so the baseline of 3 applies.

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?

States a specific verb and resource ('Mark a learning unit as completed') and enumerates the concrete effects: awards XP, unlocks the next unit, checks for course completion. This clearly separates it from the create_*/edit_* siblings, which build content rather than record completion.

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?

Gives a clear trigger condition (after the user achieves a passing score ≥50%) and notes it is called automatically by learning widgets when the user finishes. It does not name an alternative tool or state what to do if the score is below the threshold, so it stops short of full when/when-not guidance.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.