write_note
Create and store text notes with title and content for organized personal documentation and reference.
Instructions
Write 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:236-254 (handler)The handler for the 'write_note' tool. It validates title and content arguments, generates a new note ID, stores the note in the in-memory 'notes' object, and returns a text confirmation message.case 'write_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: `Wrote note ${id}: ${title}`, }, ], } }
- src/index.ts:122-138 (registration)Registration of the 'write_note' tool in the ListToolsRequestSchema handler, including name, description, and input schema definition.name: 'write_note', description: 'Write 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'], }, },