notes_create_note
Create new notes with title and content on macOS, organizing them into folders for efficient information management.
Instructions
Create new note with title and content
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"title": "<title>",
"content": "<content>"
},
"name": "notes_create_note"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| title | Yes | Note title | |
| content | Yes | Note content/body | |
| folder | No | Target folder name (optional, defaults to "Notes") |
Implementation Reference
- src/index.ts:1330-1389 (handler)The handler case for 'notes_create_note' that validates input parameters (title, content, optional folder), constructs and executes an osascript AppleScript command to create a new note in the specified Notes folder, and returns success or error message.
case 'notes_create_note': try { const title = (args?.title as string) || ''; const content = (args?.content as string) || ''; const folder = (args?.folder as string) || 'Notes'; if (!title || !content) { return { content: [ { type: 'text', text: 'Error: title and content are required', }, ], }; } const command = `osascript -e 'on run argv set noteTitle to item 1 of argv set noteContent to item 2 of argv set targetFolderName to item 3 of argv tell application "Notes" set targetFolder to folder targetFolderName set newNote to make new note in targetFolder with properties {name:noteTitle, body:noteContent} return "Note created: " & name of newNote & " in folder: " & name of targetFolder end tell end run' -- "${title}" "${content}" "${folder}"`; const { stdout, stderr } = await execAsync(command); if (stderr.trim()) { return { content: [ { type: 'text', text: `Error creating note: ${stderr.trim()}`, }, ], }; } return { content: [ { type: 'text', text: stdout.trim(), }, ], }; } catch (error: any) { return { content: [ { type: 'text', text: `Error executing note creation command: ${error.message}`, }, ], }; } - src/index.ts:176-196 (registration)Registration of the 'notes_create_note' tool in the ListTools response, including name, description, and input schema definition.
{ name: 'notes_create_note', description: 'Create new note with title and content', inputSchema: { type: 'object', properties: { title: { type: 'string', description: 'Note title', }, content: { type: 'string', description: 'Note content/body', }, folder: { type: 'string', description: 'Target folder name (optional, defaults to "Notes")', }, }, required: ['title', 'content'], }, - src/index.ts:179-196 (schema)Input schema for the notes_create_note tool defining parameters title (required string), content (required string), and optional folder (string).
inputSchema: { type: 'object', properties: { title: { type: 'string', description: 'Note title', }, content: { type: 'string', description: 'Note content/body', }, folder: { type: 'string', description: 'Target folder name (optional, defaults to "Notes")', }, }, required: ['title', 'content'], },