write_note
Create and store text notes with title and content for organized documentation and information capture.
Instructions
Write 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:236-254 (handler)The execution handler for the 'write_note' tool. Extracts title and content from input arguments, validates presence, assigns a new sequential ID, stores the note in the in-memory 'notes' dictionary, and returns a textual success response.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:124-137 (schema)Input schema for the 'write_note' tool defining the expected object structure 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:121-138 (registration)The tool registration entry in the list of available tools returned by ListToolsRequestHandler, specifying name, description, and input schema for 'write_note'.{ 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'], }, },