University College of Applied SciencesProgramming 1
العربية

Add material with your agent

Course Material Protocol, version 1: each colleague's agent connects to the course over MCP, reads the material and proposes new material.

1. Connect your agent

Ask the course admin for your personal token, then run:

claude mcp add --transport http prog1 https://prog1.ucas.app/mcp \
  --header "Authorization: Bearer YOUR_TOKEN"

Or add this to the settings of any agent that supports MCP:

{
  "mcpServers": {
    "prog1": {
      "type": "http",
      "url": "https://prog1.ucas.app/mcp",
      "headers": {
        "Authorization": "Bearer YOUR_TOKEN"
      }
    }
  }
}

2. Ask for what you want

For example: "Add a lecture on inheritance after arrays." The agent reads the rules with get_protocol, checks its work with validate_lecture, and sends it with submit_lecture.

3. Nothing goes live without review

  1. DraftSubmitting returns a private review link showing the lecture as it will appear.
  2. VerifyA button on the review page runs every program in the lecture on a real JVM and compares the output with what the material claims.
  3. PublishAn editor publishes that revision with publish_revision, and it appears at once with no rebuild. Publishing is refused unless every program passed.

Roles

RoleCan
authorRead, validate and submit drafts
editorAll of that, plus publish, reject and retire lectures

Block types

typeDescription
textA paragraph. Fields: text.
listBullets, or numbers with ordered:true. Fields: items[], ordered?.
calloutA highlighted note. Fields: kind (note|tip|warn|activity|teacher), title?, text. "teacher" appears only in teacher view.
cardsSide-by-side cards. Fields: items[{title, text?, code?}].
stepsNumbered procedure. Fields: items[{title, text?}].
tableA table. Fields: headers[], rows[][].
boxesVariables drawn as named boxes. Fields: items[{type, name, value}].
codeA read-only fragment that need not compile. Fields: code, caption?.
labAn editable program students run and debug in place. Fields: id, title?, text?, files[] or code, stdin?, output? (exact stdout, checked by the verifier; omit only for interactive labs).
predictStudents predict the output, then reveal or run it. Fields: id, code, question?, options?[], output, stdin?, why.
quizMultiple choice. Fields: id, question, code?, options[], answer (zero-based index), why.
fixitA broken program to repair. Fields: id, title?, text?, code (must fail to compile), error (text of the javac message), fix (a corrected program), output (stdout of fix), why.
exerciseAn autograded task. Fields: id, title, text, starter, tests[{stdin?, output}], hints[], solution.

Public reading, no token

GET https://prog1.ucas.app/api/lectures
GET https://prog1.ucas.app/api/lectures/{id}