Skip to main content
Glama

get_memo

Retrieve specific memos from the MCP Server Memos by providing the memo name. Enables quick access to stored information for efficient management and interaction.

Instructions

Get a memo

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameYesThe name of the memo. Format: memos/{id}

Implementation Reference

  • The main handler function for the 'get_memo' tool. It validates the input arguments using GetMemoRequest schema, calls the underlying memo_service via gRPC to fetch the memo, formats the content, and returns it as TextContent.
    async def get_memo(self, args: dict) -> list[types.TextContent]: try: params = GetMemoRequest.model_validate(args) except Exception as e: raise McpError(types.INVALID_PARAMS, str(e)) req = memos_api_v1.GetMemoRequest(name=params.name) res = await self.memo_service.get_memo(get_memo_request=req) content = f"Memo:\n{res.content}" return [types.TextContent(type="text", text=content)]
  • Pydantic schema for input validation of the get_memo tool, defining the 'name' field with description.
    class GetMemoRequest(BaseModel): """Request to get memo""" name: Annotated[ str, Field( description="""The name of the memo. Format: memos/{id} """ ), ]
  • Tool registration in the list_tools() handler, defining the tool name, description, and input schema.
    types.Tool( name=MemosTools.GET_MEMO, description="Get a memo", inputSchema=GetMemoRequest.model_json_schema(), ),
  • Dispatch logic in call_tool() that routes 'get_memo' calls to the tool adapter's handler.
    elif name == MemosTools.GET_MEMO: return await tool_adapter.get_memo(args)
  • Enum constant defining the tool name 'get_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