Skip to content

Commit 49b185f

Browse files
anatoly314claude
andcommitted
Fix note deletion by adding required title field to add-note tool
The add-note tool was missing the title field when creating notes, causing delete-note and update-note operations to fail since they identify notes by title. Changes: - Added title parameter to add-note tool schema - Include title field in noteData sent to frontend - Document that title is used as identifier for updates/deletes This fixes the issue where notes created via MCP couldn't be deleted or updated because they had no title property. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
1 parent 9a8bf2c commit 49b185f

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

apps/backend/src/mcp/primitives/essential/tools/add-note.tool.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ export class AddNoteTool {
1616
description:
1717
'Add a sticky note to the diagram for annotations, comments, or documentation. Useful for explaining design decisions.',
1818
parameters: z.object({
19+
title: z.string().describe('Note title (used as identifier for updates/deletes)'),
1920
content: z.string().describe('Note content/text'),
2021
x: z.number().optional().describe('X coordinate on canvas (optional, defaults to 100)'),
2122
y: z.number().optional().describe('Y coordinate on canvas (optional, defaults to 100)'),
@@ -37,6 +38,7 @@ export class AddNoteTool {
3738
const noteId = nanoid();
3839
const noteData = {
3940
id: noteId,
41+
title: input.title,
4042
content: input.content,
4143
x: input.x ?? 100,
4244
y: input.y ?? 100,

0 commit comments

Comments
 (0)