Skip to main content
Glama

Package HTML as SCORM 2004

scorm_package
Destructive

Convert self-contained HTML modules into SCORM 2004 packages for LMS import, with offline asset inlining and milestone-based progress tracking.

Instructions

Convert a self-contained HTML document into a SCORM 2004 4th Edition package (.zip).

Use this to turn a finished learning module (for example HTML produced by Claude Design) into a file that any SCORM-compliant LMS can import. The conversion is faithful: the HTML is preserved, external assets are inlined as data URIs so the package runs 100% offline, and a small runtime is injected to report completion and progress.

PROGRESS / COMPLETION MODEL (milestones): The author can mark meaningful steps with data-jalon + optional data-trigger:

  • J'ai lu (counts on click)

  • ... (counts when playback ends) AUTOMATIC FALLBACK: if the HTML declares NO milestone, they are generated automatically from the document structure (sections → articles → h2 → h3, capped at 8, trigger "view"). So plain HTML "just works" with meaningful progress — you do NOT need to ask the author to add attributes first. Explicit data-jalon attributes always take precedence (recommended for click/video steps). The runtime reports cmi.progress_measure = milestones_reached / total, and sets cmi.completion_status = "completed" once all milestones are reached. Progress and scroll position resume across sessions via cmi.suspend_data / cmi.location. Content can also call window.SCORM2004.reach(id) / declare(id).

Args:

  • html (string, optional): HTML content. Provide this OR input_path.

  • input_path (string, optional): path to an HTML file on disk. Provide this OR html.

  • title (string, required): course/module title shown in the LMS.

  • language (string, optional): BCP-47 tag, default 'fr-FR'.

  • identifier (string, optional): manifest id; auto-generated from title if omitted.

  • base_url (string, optional): base URL for resolving relative asset paths over the network.

  • output_dir (string, optional): where to write the .zip. Default: $SCORM_OUTPUT_DIR or ~/scorm-packages.

  • auto_milestones (boolean, optional, default true): auto-generate milestones when none are declared.

  • success_on_completion (boolean, optional, default false): also set cmi.success_status='passed' on completion.

Returns JSON: { "output_path": string, // absolute path to the generated .zip "file_name": string, "scorm_version": "2004 4th Edition", "milestone_count": number, // milestones in the package "milestone_ids": string[], "milestones_auto": boolean, // true if they were auto-generated "size_bytes": number, "warnings": string[] }

Notes:

  • Validate the resulting package on SCORM Cloud (cloud.scorm.com) before production rollout.

  • Offline completion that syncs later is provided by the LMS mobile app downloading this package; verify your target LMS apps support offline SCORM.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
htmlNoRaw HTML content to convert (e.g. the output of Claude Design). Provide this OR input_path.
titleYesCourse / module title. Used as the manifest, organization and item title shown in the LMS.
formatNoInput format. 'auto' (default) detects Claude Design .dc bundles by signature; override to force a pipeline.
base_urlNoBase URL to resolve relative/root-relative asset references over the network (only needed if the HTML uses relative URLs and no input_path is given).
languageNoContent language tag (BCP-47), e.g. 'fr-FR', 'en-US', 'it-IT'. Default: 'fr-FR'. Applied as <html lang> when the source declares none.
identifierNoManifest identifier. Auto-generated from the title if omitted.
input_pathNoAbsolute path to an HTML file on disk. Its folder is used to resolve relative assets. Provide this OR html.
output_dirNoDirectory to write the .zip package into. Defaults to $SCORM_OUTPUT_DIR or ~/scorm-packages.
vendor_cdnNoFor Claude Design (.dc) bundles: download CDN libs (React/Babel…) into the package so it runs offline (via window.__resources, no source patch). Default: true.
mastery_scoreNoPass threshold 0..1. Enables score-based success (passed/failed from cmi.score.scaled) and adds sequencing objectives to the manifest. Content reports the score via window.SCORM2004.score(raw,min,max) or a 'scorm:score' CustomEvent.
auto_milestonesNoWhen the HTML declares no [data-jalon] milestone, auto-generate 'view' milestones from the document structure (sections, then articles, then headings; max 8). Default: true.
success_on_completionNoAlso report cmi.success_status='passed' when the module completes (equivalent to adding data-scorm-success="on-completion"). Default: false.
Behavior5/5

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

The description thoroughly explains the conversion process: HTML preservation, asset inlining, runtime injection for progress and completion. The detailed milestone model and fallback behavior are also described. Annotations indicate destructiveHint=true and openWorldHint=true, but the description adds significant context beyond those hints.

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 well-structured with sections: purpose, milestone model, arguments, return value, and notes. It is front-loaded with the main purpose and progressively adds detail. Every sentence serves a purpose without redundancy.

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?

Given the tool's complexity (12 parameters, no output schema), the description is remarkably complete. It covers all parameters in context, explains the milestone system in depth, provides a clear return JSON structure, and includes actionable notes (validation, offline support). There are no gaps apparent.

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 adds substantial extra context, especially for the milestone parameters (auto_milestones, success_on_completion) and the html parameter example (Claude Design output). It details the milestone logic, which is not fully captured in the schema descriptions.

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 the tool's action: 'Convert a self-contained HTML document into a SCORM 2004 4th Edition package (.zip).' It provides a specific verb and resource, and with no sibling tools, there is no need for differentiation.

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?

The description gives clear guidance on when to use the tool: 'Use this to turn a finished learning module... into a file that any SCORM-compliant LMS can import.' It also advises validation on SCORM Cloud before production. However, since there are no sibling tools, explicit when-not-to-use is not required.

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/giacomomaria81/scorm-mcp-server'

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