Repository navigation
feat: add exercise submission and team management tools - #1
Merged
Merged
Conversation
MaximilianRau04
commented
May 15, 2026
Collaborator
- Adds ExerciseService with full exercise submission and team management support, covering the two-step Dropzone file upload flow
- Adds 8 new MCP tools: list_exercise_assignments, submit_exercise_file, list_submitted_files, delete_submitted_files, list_team_members, add_team_member, remove_team_member, search_users
- Adds domain models ExerciseAssignment, SubmittedFile, TeamMember
- Updates README with new tool groups and usage notes
There was a problem hiding this comment.
Pull request overview
Adds exercise submission and team management support to the ILIAS MCP server, including new service logic, MCP tool exposure, domain models, and README updates.
Changes:
- Introduces
ExerciseServicefor assignment listing, submissions, submitted-file deletion, user search, and team management. - Registers 8 new MCP tools for exercise and team workflows.
- Adds exercise-related models and updates README tool documentation.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 18 comments.
| File | Description |
|---|---|
src/services/exercise_service.py |
New service implementing ILIAS exercise submission and team management flows. |
src/mcp_app/server.py |
Wires ExerciseService into app context and exposes new MCP tools. |
src/domain/models.py |
Adds exercise assignment, submitted file, and team member dataclasses. |
README.md |
Documents new exercise submission and team management tool groups. |
Comments suppressed due to low confidence (7)
src/mcp_app/server.py:486
- The spread order lets
result["status"]override the tool-level"ok"status returned by the rest of this server.delete_submitted_files()returns"deleted", so successful deletes do not follow the same response contract as the other tools.
"count": len(files),
src/services/exercise_service.py:160
raise_for_status()can raiserequests.HTTPError, but this method does not wrap it inIliasExerciseErrorand the MCP tool does not catchrequests.RequestException. A failed Dropzone upload can therefore bubble out as an unhandled tool exception instead of the structured error response used elsewhere.
)
resp.raise_for_status()
try:
data = resp.json()
except Exception as exc:
raise IliasExerciseError(
f"Dropzone upload did not return JSON: {resp.text[:200]}"
) from exc
src/services/exercise_service.py:208
confirm_resp.raise_for_status()can raiserequests.HTTPError, but this direct POST is not wrapped inIliasExerciseErrorand the tool handler does not catchrequests.RequestException. Delete confirmation HTTP failures will escape as unhandled MCP errors instead of returning the structured error response used elsewhere.
allow_redirects=True,
)
confirm_resp.raise_for_status()
# Step 2: deleteDelivered → actual deletion
confirm_action = self._extract_submission_form_action(
confirm_resp.text, ref_id, ass_id
src/services/exercise_service.py:224
final_resp.raise_for_status()can raiserequests.HTTPError, but this direct POST is not wrapped inIliasExerciseErrorand the tool handler does not catchrequests.RequestException. Final delete HTTP failures will escape as unhandled MCP errors instead of returning the structured error response used elsewhere.
allow_redirects=True,
)
final_resp.raise_for_status()
remaining = self._extract_submitted_files(final_resp.text)
return {
"status": "deleted",
src/services/exercise_service.py:348
resp.raise_for_status()can raiserequests.HTTPError, but this direct POST is not wrapped inIliasExerciseErrorand the tool handler does not catchrequests.RequestException. Add-member HTTP failures will escape as unhandled MCP errors instead of returning the normal{status: error}payload.
post_url, rtoken = self._team_post_url_and_rtoken(
page_resp.text, ref_id, ass_id
)
payload = {
"user_login": username,
"cmd[addUserFromAutoComplete]": "Hinzufügen",
src/services/exercise_service.py:378
resp.raise_for_status()can raiserequests.HTTPError, but this direct POST is not wrapped inIliasExerciseErrorand the tool handler does not catchrequests.RequestException. Remove-member HTTP failures will escape as unhandled MCP errors instead of returning the normal{status: error}payload.
team_url = self._team_url(ref_id, ass_id)
page_resp = self._get(team_url, f"team page {ref_id}/{ass_id}")
post_url, rtoken = self._team_post_url_and_rtoken(
page_resp.text, ref_id, ass_id
)
payload = {
src/services/exercise_service.py:11
SubmittedFileis imported but never used. The repo runsruff check .in CI, and Ruff's default checks include unused imports, so this will fail the quality job unless the import is removed or the service returns the model.
from domain.models import ExerciseAssignment, TeamMember
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
DenizAltunkapan
self-requested a review
May 18, 2026 20:27
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.