Skip to main content
Glama

moodle_submit_assignment

Submits an assignment's online text and/or local files to Moodle for grading, with a confirmation step because submission is irreversible.

Instructions

Submit an assignment (online text and/or files). IRREVERSIBLE once submitted.

Before calling with confirm=true, show the user exactly what will be submitted and get an explicit "yes". If the assignment has an originality statement checkbox, this tool accepts it on the user's behalf.

Args: cmid: course-module id of the assignment. text: online text to submit (optional). files: local file paths to upload (optional). submit_for_grading: if true, also post the final "Submit assignment" step. If false, stop after saving — but note that assignments without drafts submit as soon as they are saved. confirm: must be true; safety switch against accidental submissions.

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": {
      "cmid": "<cmid>"
    },
    "name": "moodle_submit_assignment"
  }
}

Input Schema

NameRequiredDescriptionDefault
cmidYes
textNo
filesNo
confirmNo
submit_for_gradingNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.5.1

TDQS

A4.2/5.0
Behavior4/5

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

With no annotations provided, the description carries the full burden and does substantial work: it flags the operation as IRREVERSIBLE, states that confirm acts as a safety switch, notes that originality statements are accepted on the user's behalf, and warns about draft-less assignments auto-submitting. It omits permission/auth requirements and says nothing about what happens if submission fails.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

It is front-loaded with the purpose and the IRREVERSIBLE warning before any parameter detail, which is the right ordering for a destructive tool. The Args block is a conventional list but every entry adds semantics, though the two separate mentions of confirm=true are slightly redundant.

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?

For a 5-parameter mutating tool with no annotations and no output schema, the description covers the destructive nature, the confirmation protocol, the grading branch, and the originality-statement side effect. It leaves out only error behavior and the shape of the result, which an agent would likely want for a write operation.

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

Parameters5/5

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

Schema description coverage is 0%, so the description must document all five parameters, and it does: cmid, optional text, optional file paths, submit_for_grading, and the mandatory confirm. It adds meaning beyond mere naming, particularly the warning that submit_for_grading=false is not always a safe dry run, and that confirm must be true to prevent accidental submissions.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description uses a specific verb and resource ('Submit an assignment (online text and/or files)') that clearly separates it from read-side siblings like moodle_get_assignment and moodle_list_assignments, and from moodle_remove_submission. It never explicitly names a sibling or an alternative, so the differentiation is implied rather than stated.

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?

It gives concrete usage conditions: show the user exactly what will be submitted, obtain an explicit 'yes', and only then pass confirm=true. It also explains the branching behavior of submit_for_grading, including the non-obvious case where assignments without drafts submit as soon as they are saved. It stops short of naming an alternative tool for undoing a submission.

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