Skip to main content
Glama

create_memo

Generate and store new memos with customizable content and visibility settings, enabling organized and secure note management through the MCP Server Memos interface.

Instructions

Create a new memo

Input Schema

NameRequiredDescriptionDefault
contentYesThe content of the memo.
visibilityNoThe visibility of the memo.PRIVATE

Input Schema (JSON Schema)

{ "$defs": { "Visibility": { "enum": [ "PUBLIC", "PROTECTED", "PRIVATE" ], "title": "Visibility", "type": "string" } }, "description": "Request to create memo", "properties": { "content": { "description": "The content of the memo.", "title": "Content", "type": "string" }, "visibility": { "$ref": "#/$defs/Visibility", "default": "PRIVATE", "description": "The visibility of the memo." } }, "required": [ "content" ], "title": "CreateMemoRequest", "type": "object" }

Implementation Reference

  • Handler function in MemoServiceToolAdapter that implements the create_memo tool logic: validates args, creates protobuf request, calls memo_service.create_memo, and returns confirmation text.
    async def create_memo(self, args: dict) -> list[types.TextContent]: try: params = CreateMemoRequest.model_validate(args) except Exception as e: raise McpError(types.INVALID_PARAMS, str(e)) req = memos_api_v1.CreateMemoRequest( content=params.content, visibility=params.visibility.to_proto(), ) res = await self.memo_service.create_memo(create_memo_request=req) content = f"Memo created: {res.name}" return [types.TextContent(type="text", text=content)]
  • Pydantic BaseModel defining the input schema for the create_memo tool, including 'content' (str) and 'visibility' (Visibility enum, default PRIVATE).
    class CreateMemoRequest(BaseModel): """Request to create memo""" content: Annotated[ str, Field( description="""The content of the memo.""", ), ] visibility: Annotated[ Visibility, Field(default=Visibility.PRIVATE, description="""The visibility of the memo."""), ]
  • Tool registration in the MCP server's list_tools() method, specifying name 'create_memo', description, and input schema from CreateMemoRequest.
    types.Tool( name=MemosTools.CREATE_MEMO, description="Create a new memo", inputSchema=CreateMemoRequest.model_json_schema(), ),
  • Dispatch logic in the MCP server's call_tool() method that routes 'create_memo' calls to the tool adapter's create_memo handler.
    elif name == MemosTools.CREATE_MEMO: return await tool_adapter.create_memo(args)
  • Enum defining tool names, including CREATE_MEMO = 'create_memo' used for registration and dispatching.
    class MemosTools(str, Enum): LIST_MEMO_TAGS = "list_memo_tags" SEARCH_MEMO = "search_memo" CREATE_MEMO = "create_memo" GET_MEMO = "get_memo"

Other Tools

Related Tools

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/RyoJerryYu/mcp-server-memos-py'

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