create_note
Create text notes with title and content for organized storage and easy access through a simple note-taking system.
Instructions
Create a new note
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| content | Yes | Text content of the note | |
| title | Yes | Title of the note |
Implementation Reference
- src/index.ts:216-234 (handler)Handler for the 'create_note' tool: extracts title and content, generates new ID, stores the note in memory, returns confirmation.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:103-120 (registration)Registration of 'create_note' tool in ListTools handler, including 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'], }, },
- src/index.ts:106-119 (schema)Input schema for 'create_note': requires title and content as strings.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:26-29 (helper)In-memory notes store used by the create_note handler.const notes: { [id: string]: Note } = { '1': { title: 'First Note', content: 'This is note 1' }, '2': { title: 'Second Note', content: 'This is note 2' }, }