Skip to main content
Glama
RyoJerryYu

MCP Server Memos

by RyoJerryYu

create_memo

Create and store memos with customizable visibility settings to organize thoughts and information in the MCP Server Memos system.

Instructions

Create a new memo

Input Schema

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

Implementation Reference

  • The primary handler for the 'create_memo' MCP tool. It validates the input arguments using CreateMemoRequest, constructs a protobuf CreateMemoRequest, calls the underlying memo_service gRPC stub to create the memo, and returns a TextContent response with the created memo's name.
    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 (string) and visibility (enum: PUBLIC, PROTECTED, 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."""),
        ]
  • Registration of the 'create_memo' tool in the MCP server's list_tools() handler, specifying name, description, and input schema.
        name=MemosTools.CREATE_MEMO,
        description="Create a new memo",
        inputSchema=CreateMemoRequest.model_json_schema(),
    ),
  • Dispatch logic in the MCP server's call_tool() handler that routes calls to the create_memo handler when the tool name matches.
    elif name == MemosTools.CREATE_MEMO:
        return await tool_adapter.create_memo(args)
  • Enum defining the tool names, including CREATE_MEMO = "create_memo", used throughout 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"

Tool Definition Quality

Score is being calculated. Check back soon.

Install Server

Other 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