feat: lokaler MCP-Server, Phase 3 (kleinteilige Unit/Lesson-Tools)
Statt eines "update_lesson", das die ganze Stunde inkl. Verlaufsplan als ein großes JSON-Objekt tauscht, gezielte kleine Tools je Teiloperation (Nutzervorschlag): create/update_unit, create/update_lesson (Metadaten ohne Phasen), add/update/remove_lesson_phase (je eine Phase), download_lesson_attachment (Base64, auf 3 MB gedeckelt). Verkürzt das Lesen-Schreiben-Zeitfenster je Operation und liefert lesbare Diffs für den Bestätigungsdialog statt eines Objekt-Dumps. ILessonRepository um GetById ergänzt (fehlte bisher, war aber Voraussetzung für jedes der neuen Tools). get_lesson_plans liefert jetzt zusätzlich Phase-IDs und Attachment-Metadaten, damit ein Client sie gezielt referenzieren kann. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
@@ -24,11 +24,20 @@ public record TimeEntryDto(
|
||||
Guid Id, Guid? TaskId, string Category, Guid? GroupId, DateOnly Date,
|
||||
TimeOnly? StartTime, TimeOnly? EndTime, int DurationMinutes, string? Description);
|
||||
|
||||
public record LessonPhaseDto(string Name, int DurationMinutes, string Activity, string Material, string Shorthand);
|
||||
public record LessonPhaseDto(Guid Id, string Name, int DurationMinutes, string Activity, string Material, string Shorthand);
|
||||
|
||||
public record LessonAttachmentDto(string StorageId, string FileName, long SizeBytes);
|
||||
|
||||
public record LessonDto(
|
||||
Guid Id, Guid UnitId, Guid GroupId, DateOnly Date, int? LessonNumber, string Topic,
|
||||
string? Homework, LessonStatus Status, List<LessonPhaseDto> Phases);
|
||||
string? Homework, LessonStatus Status, List<LessonPhaseDto> Phases,
|
||||
List<LessonAttachmentDto> Attachments);
|
||||
|
||||
/// <summary>Ergebnis von "download_lesson_attachment": Inhalt Base64-kodiert, weil MCP-Tool-Antworten
|
||||
/// als JSON/Text übertragen werden. Bewusst kein Ressourcen-URI-Mechanismus (siehe Planungsdokument) -
|
||||
/// dafür müsste der Server MCP-Resources anbieten, was über den Rahmen dieses Tools hinausgeht;
|
||||
/// stattdessen deckelt <see cref="LessonPlanTools.MaxInlineAttachmentBytes"/> die Größe.</summary>
|
||||
public record AttachmentContentDto(string FileName, long SizeBytes, string Base64Content);
|
||||
|
||||
public record UnitDto(
|
||||
Guid Id, Guid GroupId, string Title, DateOnly? StartDate, DateOnly? EndDate,
|
||||
|
||||
Reference in New Issue
Block a user