notes_create
Create new notes with specified titles and content using this tool from the Vulnerable Notes MCP Server, which demonstrates security vulnerabilities for testing and training purposes.
Instructions
Create a new note with the given title and content
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| title | Yes | Title of the note | |
| content | Yes | Content of the note |
Implementation Reference
- src/tools/notes.ts:106-119 (handler)The implementation of the notes_create tool handler. It takes a title and content, ensures the notes directory exists, and writes the note content to a Markdown file.
case "notes_create": { const { title, content } = args as { title: string; content: string }; const filePath = getNotePath(title); // Ensure directory exists if (!fs.existsSync(NOTES_DIR)) { fs.mkdirSync(NOTES_DIR, { recursive: true }); } fs.writeFileSync(filePath, content); return { content: [{ type: "text", text: `Note "${title}" created successfully` }], }; } - src/tools/notes.ts:18-29 (registration)The registration and schema definition for the notes_create tool, including its name, description, and input parameters.
{ name: "notes_create", description: "Create a new note with the given title and content", inputSchema: { type: "object" as const, properties: { title: { type: "string", description: "Title of the note" }, content: { type: "string", description: "Content of the note" }, }, required: ["title", "content"], }, },