create_note
Add new notes to databases by specifying title and content. This tool enables structured data entry for database management systems.
Instructions
Create a new note
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| title | Yes | Title of the note | |
| content | Yes | Text content of the note |
Implementation Reference
- src/index.ts:161-177 (handler)Handler for the create_note tool. It extracts title and content from arguments, validates them, generates a new ID, stores the note in the in-memory notes object, and returns a success message with the new note ID and title.case "create_note": { const title = String(request.params.arguments?.title); const content = String(request.params.arguments?.content); if (!title || !content) { throw new Error("Title and content are required"); } const id = String(Object.keys(notes).length + 1); notes[id] = { title, content }; return { content: [{ type: "text", text: `Created note ${id}: ${title}` }] }; }
- src/index.ts:110-123 (schema)Input schema for the create_note tool, defining an object with required 'title' and 'content' string properties.inputSchema: { type: "object", properties: { title: { type: "string", description: "Title of the note" }, content: { type: "string", description: "Text content of the note" } }, required: ["title", "content"] }
- src/index.ts:107-124 (registration)Registration of the 'create_note' tool within the ListToolsRequestSchema handler, specifying name, description, and input schema.{ name: "create_note", description: "Create a new note", inputSchema: { type: "object", properties: { title: { type: "string", description: "Title of the note" }, content: { type: "string", description: "Text content of the note" } }, required: ["title", "content"] } },