Skip to main content
Glama

create_note

Create a new Markdown note with title, content, and optional tags to organize your thoughts and documentation in a structured format.

Instructions

Create a new Markdown note

Args: title: Note title content: Note content tags: Optional comma-separated list of tags

Returns: Confirmation message of note creation

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
titleYes
contentYes
tagsNo

Implementation Reference

  • The handler function that implements the 'create_note' tool logic. Decorated with @mcp.tool() for automatic registration in the MCP server. Includes type annotations and docstring defining the input schema. Creates a new note file with timestamped sanitized filename, formats Markdown content with metadata, writes to disk, and returns confirmation.
    @mcp.tool() def create_note(title: str, content: str, tags: str = "") -> str: """ Create a new Markdown note Args: title: Note title content: Note content tags: Optional comma-separated list of tags Returns: Confirmation message of note creation """ ensure_notes_dir() timestamp = datetime.now().strftime("%Y%m%d_%H%M%S") filename = f"{timestamp}_{sanitize_filename(title)}.md" filepath = os.path.join(NOTES_DIR, filename) note_content = f"# {title}\n\n" note_content += f"**Created:** {datetime.now().strftime('%Y-%m-%d %H:%M:%S')}\n" if tags: note_content += f"**Tags:** {tags}\n" note_content += f"\n---\n\n{content}\n" with open(filepath, "w", encoding="utf-8") as f: f.write(note_content) return f"Note '{title}' created: {filename}"

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/sayranovv/notes-mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server