create_note
Generate and manage notes with a title and text using JSON output, facilitated by the Keep MCP server for Google Keep integration and organization.
Instructions
Create a new note with title and text.
Args:
title (str, optional): The title of the note
text (str, optional): The content of the note
Returns:
str: JSON string containing the created note's data
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| text | No | ||
| title | No |
Implementation Reference
- src/server/cli.py:29-53 (handler)This is the core handler function for the MCP 'create_note' tool. Decorated with @mcp.tool(), it handles the tool execution: authenticates the Keep client, creates a new note, adds a specific label, syncs changes, and returns JSON-serialized note data.@mcp.tool() def create_note(title: str = None, text: str = None) -> str: """ Create a new note with title and text. Args: title (str, optional): The title of the note text (str, optional): The content of the note Returns: str: JSON string containing the created note's data """ keep = get_client() note = keep.createNote(title=title, text=text) # Get or create the keep-mcp label label = keep.findLabel('keep-mcp') if not label: label = keep.createLabel('keep-mcp') # Add the label to the note note.labels.add(label) keep.sync() # Ensure the note is created and labeled on the server return json.dumps(serialize_note(note))