Skip to main content
Glama

publish_exam_lesson

Create or update a Moodle quiz from GIFT text, then repair and promote it so students can attempt it immediately. Idempotent by course and slug.

Instructions

Create or update a quiz and populate it with GIFT questions in one call. Runs plugin repair+promote steps after import so the quiz is immediately attemptable. Idempotent by (course_id, slug).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameYes
slugYesStable slug for this quiz. Same slug → same quiz (idempotent).
gradeNo
introNo
visibleNo
attemptsNo
course_idYes
gift_textYesGIFT-formatted question block. Will be imported into the quiz.
grademethodNohighest
section_numNo
category_nameNo
repair_sectionsNoAfter import, call repair_quiz_sections to ensure the quiz has a default quiz_sections row (fixes "noquestionsfound" attempts).
promote_questionsNoAfter import, promote question_versions from draft to ready (makes them visible in attempts).
timelimit_secondsNo
Behavior4/5

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

No annotations are provided, so the description carries the full burden. It discloses idempotency by (course_id, slug) and mentions that repair+promote steps are run, making the quiz immediately attemptable. These are meaningful behavioral facts beyond the schema, though details on return values or error handling are absent.

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?

The description is three sentences long, starts with the primary purpose, and includes no redundant or filler content. Every sentence earns its place, making it highly concise and well-structured.

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

Completeness2/5

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

Given the complexity of 14 parameters, no output schema, and no annotations, the description is too brief. It covers the core action and key behaviors but leaves out return-value semantics, error handling, and the meaning of several parameters, making it incomplete for effective agent use.

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

Parameters2/5

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

Schema description coverage is only 29% (4 of 14 params have descriptions). The description mentions course_id and slug for idempotency and gift_text for questions, but it does not clarify many other parameters like grademethod, section_num, or timelimit_seconds. With such low coverage, the description insufficiently compensates.

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?

The description clearly states a create-or-update operation for a quiz populated with GIFT questions, distinguishing it from sibling tools like import_gift or configure_quiz. The mention of 'in one call' additionally highlights its combined nature, making the purpose unambiguous.

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

Usage Guidelines3/5

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

The description implies usage as a combined create/update + import operation, but it does not explicitly contrast with alternatives such as import_gift when a quiz already exists. There is no when-not guidance or mention of preferred scenarios, leaving some ambiguity.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/sernobre/moodle-mcp-sernobre'

If you have feedback or need assistance with the MCP directory API, please join our Discord server