Skip to content

Commit 513a666

Browse files
committed
feat(note-tools): rename summary parameter to title for clarity
1 parent 24aec23 commit 513a666

File tree

1 file changed

+10
-12
lines changed

1 file changed

+10
-12
lines changed

src/mcp/tools/note-tools.ts

Lines changed: 10 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -165,19 +165,19 @@ export class NoteToolRegistry extends ToolRegistry {
165165
.describe(
166166
"The content of the note (supports markdown format)"
167167
),
168-
summary: z
168+
title: z
169169
.string()
170170
.optional()
171171
.default("")
172-
.describe("An optional short summary or title for the note")
172+
.describe("An short title or summary for the note")
173173
},
174-
async ({ questionId, content, summary = "" }) => {
174+
async ({ questionId, content, title = "" }) => {
175175
try {
176176
const data = await this.leetcodeService.createUserNote(
177177
content,
178178
"COMMON_QUESTION",
179179
questionId,
180-
summary
180+
title
181181
);
182182

183183
return {
@@ -210,28 +210,26 @@ export class NoteToolRegistry extends ToolRegistry {
210210
// Note update tool (CN-specific, requires authentication)
211211
this.server.tool(
212212
"update_note",
213-
"Updates an existing note with new content or summary, allowing users to refine their saved observations (requires authentication, CN only)",
213+
"Updates an existing note with new content or title, allowing users to refine their saved observations (requires authentication, CN only)",
214214
{
215215
noteId: z.string().describe("The ID of the note to update"),
216216
content: z
217217
.string()
218+
.default("")
218219
.describe(
219220
"The new content for the note (supports markdown format)"
220221
),
221-
summary: z
222+
title: z
222223
.string()
223-
.optional()
224224
.default("")
225-
.describe(
226-
"An optional new short summary or title for the note"
227-
)
225+
.describe("An new short title or summary for the note")
228226
},
229-
async ({ noteId, content, summary = "" }) => {
227+
async ({ noteId, content, title = "" }) => {
230228
try {
231229
const data = await this.leetcodeService.updateUserNote(
232230
noteId,
233231
content,
234-
summary
232+
title
235233
);
236234

237235
return {

0 commit comments

Comments
 (0)