diff --git a/src/Novelly.Mcp/Tools/ManuscriptTools.cs b/src/Novelly.Mcp/Tools/ManuscriptTools.cs index 056d2d4..fb1c691 100644 --- a/src/Novelly.Mcp/Tools/ManuscriptTools.cs +++ b/src/Novelly.Mcp/Tools/ManuscriptTools.cs @@ -24,13 +24,15 @@ public static class ManuscriptTools api.GetAsync($"/api/chapters/{chapterId}", ct); [McpServerTool(Name = "create_chapter")] - [Description("Add a chapter to a novel. It goes at the end of the manuscript unless you supply a number.")] + [Description("Add a chapter to a novel. It goes at the end of the manuscript unless you supply a number. " + + "Use 'kind' for a foreword, prologue, afterword, or other unnumbered front/back matter.")] public static Task CreateChapter( NovelApiClient api, [Description("The novel's id.")] Guid novelId, [Description("Chapter title.")] string title, CancellationToken ct, - [Description("Position in the manuscript, 1-based.")] int? number = null, + [Description("Manuscript position, 1-based, counting front and back matter.")] int? number = null, + [Description("FrontMatter, Body, or BackMatter. Defaults to Body.")] string? kind = null, [Description("The chapter's outline summary paragraph.")] string? summary = null, [Description("Where and when the chapter takes place. Unknown locations are created.")] string[]? locations = null, [Description("Planned, Outlined, Drafted, Revised or Final.")] string? status = null, @@ -41,6 +43,7 @@ public static class ManuscriptTools { title, number, + kind = kind ?? "Body", summary, locations, status = status ?? "Planned", @@ -50,7 +53,7 @@ public static class ManuscriptTools }, ct); [McpServerTool(Name = "update_chapter")] - [Description("Revise a chapter's title, number, summary, locations, notes, status " + [Description("Revise a chapter's title, number, kind, summary, locations, notes, status " + "or drafted prose. Use 'prose' to write or replace the chapter's draft text in " + "markdown; the word count is recomputed automatically.")] public static Task UpdateChapter( @@ -58,7 +61,8 @@ public static class ManuscriptTools [Description("The chapter's id.")] Guid chapterId, CancellationToken ct, [Description("New title.")] string? title = null, - [Description("Position in the manuscript.")] int? number = null, + [Description("Manuscript position, 1-based, counting front and back matter.")] int? number = null, + [Description("FrontMatter, Body, or BackMatter.")] string? kind = null, [Description("The chapter's outline summary paragraph.")] string? summary = null, [Description("Where and when the chapter takes place. Replaces the existing locations. Unknown locations are created.")] string[]? locations = null, [Description("Anything else worth recording.")] string? notes = null, @@ -67,5 +71,5 @@ public static class ManuscriptTools [Description("The chapter's drafted text, in markdown.")] string? prose = null, [Description("Tags for cross-referencing. Replaces the existing tags.")] string[]? tags = null) => api.PatchAsync($"/api/chapters/{chapterId}", - new { title, number, summary, locations, notes, status, targetWordCount, prose, tags }, ct); + new { title, number, kind, summary, locations, notes, status, targetWordCount, prose, tags }, ct); }