create_note
Create and store text notes with titles and content for organized documentation and information management.
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:216-234 (handler)The execution handler for the 'create_note' tool. It validates the title and content arguments, generates a new sequential ID, stores the note in the in-memory 'notes' object, and returns a text response confirming creation with the 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:106-119 (schema)Input JSON Schema for the 'create_note' tool, specifying 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:103-120 (registration)Tool registration in the ListToolsRequestSchema handler response array, defining the name, description, and input schema for 'create_note'.{ 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'], }, },