Skip to main content
Glama
RyoJerryYu

MCP Server Memos

by RyoJerryYu

search_memo

Search memo content using a keyword to retrieve relevant memos.

Instructions

Search for memos

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
key_wordYesThe key words to search for in the memo content.

Implementation Reference

  • The async handler function `search_memo` in `MemoServiceToolAdapter`. It validates input using `SearchMemoRequest`, builds a `ListMemosRequest` with a filter for row_status 'NORMAL' and content_search matching the keyword, calls the gRPC `list_memos` API, and returns the concatenated memo contents as `TextContent`.
    async def search_memo(self, args: dict) -> list[types.TextContent]:
        try:
            params = SearchMemoRequest.model_validate(args)
        except Exception as e:
            raise McpError(types.INVALID_PARAMS, str(e))
    
        req = memos_api_v1.ListMemosRequest(
            filter=f"row_status == 'NORMAL' && content_search == ['{params.key_word}']"
        )
        res = await self.memo_service.list_memos(list_memos_request=req)
        content = ", ".join([memo.content for memo in res.memos])
        content = f"Search result:\n{content}"
        return [types.TextContent(type="text", text=content)]
  • `SearchMemoRequest` Pydantic model defining the input schema. It has a single required field `key_word` (str) with a description.
    class SearchMemoRequest(BaseModel):
        """Request to search memo"""
    
        key_word: Annotated[
            str,
            Field(
                description="""The key words to search for in the memo content.""",
            ),
        ]
  • `MemosTools` enum defining `SEARCH_MEMO = 'search_memo'` as the tool name constant.
    class MemosTools(str, Enum):
        LIST_MEMO_TAGS = "list_memo_tags"
        SEARCH_MEMO = "search_memo"
        CREATE_MEMO = "create_memo"
        GET_MEMO = "get_memo"
  • Tool registration in `list_tools()`: exposes the `search_memo` tool with its name, description, and input schema.
    @server.list_tools()
    async def list_tools() -> list[types.Tool]:
        return [
            types.Tool(
                name=MemosTools.SEARCH_MEMO,
                description="Search for memos",
                inputSchema=SearchMemoRequest.model_json_schema(),
            ),
  • Tool dispatch in `call_tool()`: routes incoming tool calls with name `search_memo` to `tool_adapter.search_memo(args)`.
    # search
    @server.call_tool()
    async def call_tool(name: str, args: dict) -> list[types.TextContent]:
        if name == MemosTools.SEARCH_MEMO:
            return await tool_adapter.search_memo(args)
Behavior1/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations provided, and the description does not disclose any behavioral traits such as search scope, result limits, pagination, or case sensitivity. For a search tool, this is a critical gap.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single sentence, which is concise, but it lacks necessary detail. It is not overly long, but could be more informative without being verbose.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given no output schema, the description should hint at return structure. It does not. The tool is simple, but the description is incomplete for a search tool.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100% with 'key_word' clearly described as 'The key words to search for in the memo content.' The description adds no additional meaning beyond the schema, earning a baseline score of 3.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose3/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description 'Search for memos' states the verb and resource, but it is vague and does not explicitly distinguish from siblings like get_memo. The schema clarifies it searches by keyword in content, so purpose is somewhat clear.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No guidance on when to use this tool versus alternatives (e.g., get_memo for exact ID search, list_memo_tags for tags). The description lacks context for appropriate usage.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

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