Remove Scenes, group beats by multiple characters; strip comments repo-wide
Drop the Scene entity/grouping in favor of chapters carrying prose directly and beats belonging to many characters. Add markdown editor + character multi-select components to the web client. Remove all XML doc and inline comments across the touched C#/TS/CSS files in favor of self-documenting names, and record that convention in CLAUDE.md. Add .mcp.json (local MCP server config, no secrets) and ignore .idea/.
This commit is contained in:
@@ -8,7 +8,7 @@ namespace Novelly.Mcp.Tools;
|
||||
public static class ManuscriptTools
|
||||
{
|
||||
[McpServerTool(Name = "list_chapters")]
|
||||
[Description("List a project's chapters in manuscript order, with scene and word counts.")]
|
||||
[Description("List a project's chapters in manuscript order, with beat and word counts.")]
|
||||
public static Task<CallToolResult> ListChapters(
|
||||
NovelApiClient api,
|
||||
[Description("The project's id.")] Guid projectId,
|
||||
@@ -16,7 +16,7 @@ public static class ManuscriptTools
|
||||
api.GetAsync($"/api/projects/{projectId}/chapters", ct);
|
||||
|
||||
[McpServerTool(Name = "get_chapter")]
|
||||
[Description("Read one chapter in full, including every scene and any drafted prose.")]
|
||||
[Description("Read one chapter in full: its outline (beats) and its drafted prose.")]
|
||||
public static Task<CallToolResult> GetChapter(
|
||||
NovelApiClient api,
|
||||
[Description("The chapter's id.")] Guid chapterId,
|
||||
@@ -36,6 +36,7 @@ public static class ManuscriptTools
|
||||
[Description("Where and when the chapter takes place.")] string? setting = null,
|
||||
[Description("Planned, Outlined, Drafted, Revised or Final.")] string? status = null,
|
||||
[Description("Target length in words.")] int? targetWordCount = null,
|
||||
[Description("The chapter's drafted text, in markdown, if you are writing it now.")] string? prose = null,
|
||||
[Description("Tags for cross-referencing. Unknown tags are created.")] string[]? tags = null) =>
|
||||
api.PostAsync($"/api/projects/{projectId}/chapters", new
|
||||
{
|
||||
@@ -46,11 +47,14 @@ public static class ManuscriptTools
|
||||
setting,
|
||||
status = status ?? "Planned",
|
||||
targetWordCount,
|
||||
prose,
|
||||
tags
|
||||
}, ct);
|
||||
|
||||
[McpServerTool(Name = "update_chapter")]
|
||||
[Description("Revise a chapter's title, number, summary, POV character, setting, notes or status.")]
|
||||
[Description("Revise a chapter's title, number, summary, POV character, setting, 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<CallToolResult> UpdateChapter(
|
||||
NovelApiClient api,
|
||||
[Description("The chapter's id.")] Guid chapterId,
|
||||
@@ -63,77 +67,8 @@ public static class ManuscriptTools
|
||||
[Description("Anything else worth recording.")] string? notes = null,
|
||||
[Description("Planned, Outlined, Drafted, Revised or Final.")] string? status = null,
|
||||
[Description("Target length in words.")] int? targetWordCount = null,
|
||||
[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, povCharacterId, setting, notes, status, targetWordCount, tags }, ct);
|
||||
|
||||
[McpServerTool(Name = "list_scenes")]
|
||||
[Description("List a chapter's scenes in order.")]
|
||||
public static Task<CallToolResult> ListScenes(
|
||||
NovelApiClient api,
|
||||
[Description("The chapter's id.")] Guid chapterId,
|
||||
CancellationToken ct) =>
|
||||
api.GetAsync($"/api/chapters/{chapterId}/scenes", ct);
|
||||
|
||||
[McpServerTool(Name = "create_scene")]
|
||||
[Description("Add a scene to a chapter. The goal/conflict/outcome trio is what makes a scene "
|
||||
+ "draftable later, so fill those in when there is enough to work with.")]
|
||||
public static Task<CallToolResult> CreateScene(
|
||||
NovelApiClient api,
|
||||
[Description("The chapter's id.")] Guid chapterId,
|
||||
[Description("Scene title.")] string title,
|
||||
CancellationToken ct,
|
||||
[Description("Position within the chapter. Appended to the end when omitted.")] int? sortOrder = null,
|
||||
[Description("What happens in the scene.")] string? summary = null,
|
||||
[Description("What the POV character is trying to achieve.")] string? goal = null,
|
||||
[Description("What stands in the way.")] string? conflict = null,
|
||||
[Description("How it lands, and what it costs.")] string? outcome = null,
|
||||
[Description("Id of the point-of-view character.")] Guid? povCharacterId = null,
|
||||
[Description("Where the scene takes place.")] string? location = null,
|
||||
[Description("Drafted prose for the scene, if you are writing it now.")] string? prose = null,
|
||||
[Description("Planned, Outlined, Drafted, Revised or Final.")] string? status = null) =>
|
||||
api.PostAsync($"/api/chapters/{chapterId}/scenes", new
|
||||
{
|
||||
title,
|
||||
sortOrder,
|
||||
summary,
|
||||
goal,
|
||||
conflict,
|
||||
outcome,
|
||||
povCharacterId,
|
||||
location,
|
||||
prose,
|
||||
status = status ?? "Planned"
|
||||
}, ct);
|
||||
|
||||
[McpServerTool(Name = "update_scene")]
|
||||
[Description("Revise a scene. Supplying 'prose' writes or replaces the scene's draft text and "
|
||||
+ "recomputes its word count.")]
|
||||
public static Task<CallToolResult> UpdateScene(
|
||||
NovelApiClient api,
|
||||
[Description("The scene's id.")] Guid sceneId,
|
||||
CancellationToken ct,
|
||||
[Description("New title.")] string? title = null,
|
||||
[Description("Position within the chapter.")] int? sortOrder = null,
|
||||
[Description("What happens in the scene.")] string? summary = null,
|
||||
[Description("What the POV character is trying to achieve.")] string? goal = null,
|
||||
[Description("What stands in the way.")] string? conflict = null,
|
||||
[Description("How it lands, and what it costs.")] string? outcome = null,
|
||||
[Description("Id of the point-of-view character.")] Guid? povCharacterId = null,
|
||||
[Description("Where the scene takes place.")] string? location = null,
|
||||
[Description("Drafted prose for the scene.")] string? prose = null,
|
||||
[Description("Planned, Outlined, Drafted, Revised or Final.")] string? status = null) =>
|
||||
api.PatchAsync($"/api/scenes/{sceneId}", new
|
||||
{
|
||||
title,
|
||||
sortOrder,
|
||||
summary,
|
||||
goal,
|
||||
conflict,
|
||||
outcome,
|
||||
povCharacterId,
|
||||
location,
|
||||
prose,
|
||||
status
|
||||
}, ct);
|
||||
new { title, number, summary, povCharacterId, setting, notes, status, targetWordCount, prose, tags }, ct);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user