submit_assignment
Submit text and/or file attachments for an assignment. IRREVERSIBLE once dry_run=False.
Call with dry_run=True (default) first, show the preview to the user, and
only call again with dry_run=False (same parameters) after they explicitly
confirm. Provide text, file_paths/file_contents, or both -- whichever this
assignment actually accepts (see get_assignment_detail).
file_paths works only when this server is running locally (stdio, e.g.
Claude Code/Desktop) -- rejected with a clear error over a remote
(streamable-http, e.g. a Claude.ai Connector) connection, mirroring
download_course_file's own stdio-vs-remote split. file_contents works
over either transport and is the only option remotely, since this
server's disk is not reachable by you there.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| text | No | Plain-text submission content. Omit (empty string) for a file-only submission. Rejected if this assignment doesn't accept online text -- check get_assignment_detail's onlinetext_submission.enabled first. | |
| dry_run | No | If True (default), only preview the submission without sending it. Call again with dry_run=False (same parameters) to actually submit it. | |
| course_id | Yes | PLATO/Moodle numeric course id, e.g. from list_courses. | |
| file_paths | No | Local filesystem paths to upload as file attachments. Only works when this server is running locally (stdio) -- rejected with a clear error over a remote/streamable-http connection (use file_contents there instead). Rejected if this assignment doesn't accept file submissions, exceeds its max file count/size, or uses a disallowed extension -- check get_assignment_detail's file_submission (enabled/max_files/max_size_bytes/allowed_extensions) first. | |
| assignment_id | Yes | Assignment id, e.g. from list_assignments. | |
| file_contents | No | File attachments as {filename, content_base64} -- works over either transport, and is the only way to attach files when this server is running remotely (streamable-http), since it has no local filesystem to read a path from there. Each file is capped at 5MB decoded, in addition to this assignment's own max file count/size/extension rules (see get_assignment_detail's file_submission). |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| dry_run | Yes | ||
| message | Yes | ||
| preview | Yes | ||
| executed | Yes |