Skip to main content
Glama
RyoJerryYu

MCP Server Memos

by RyoJerryYu

search_memo

Search for memos by keywords to find specific notes and information stored in the MCP Server Memos system.

Instructions

Search for memos

Input Schema

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

Implementation Reference

  • The handler function in MemoServiceToolAdapter that validates input, calls the memos API to list memos matching the keyword, and returns the search results as text content.
    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)]
  • Pydantic BaseModel defining the input schema for the search_memo tool, with a required 'key_word' field.
    class SearchMemoRequest(BaseModel):
        """Request to search memo"""
    
        key_word: Annotated[
            str,
            Field(
                description="""The key words to search for in the memo content.""",
            ),
        ]
  • Registration of the 'search_memo' tool in the list_tools() decorator, specifying name, description, and input schema.
    types.Tool(
        name=MemosTools.SEARCH_MEMO,
        description="Search for memos",
        inputSchema=SearchMemoRequest.model_json_schema(),
    ),
  • Dispatch logic in the call_tool() decorator that routes calls to the search_memo handler when the tool name matches.
    if name == MemosTools.SEARCH_MEMO:
        return await tool_adapter.search_memo(args)
  • Constant definition for the tool name within the MemosTools enum.
    SEARCH_MEMO = "search_memo"
Behavior2/5

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

No annotations are provided, so the description carries the full burden of behavioral disclosure. 'Search for memos' implies a read-only operation but doesn't specify aspects like pagination, sorting, error handling, or performance characteristics (e.g., rate limits). It lacks details on what the search returns (e.g., full memos, summaries) or any constraints, leaving significant gaps in understanding the tool's behavior.

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

Conciseness4/5

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

The description is extremely concise with 'Search for memos', which is front-loaded and wastes no words. However, it may be overly brief, potentially under-specifying the tool's purpose and usage, which could hinder clarity. It earns a 4 for efficiency but loses a point for possibly sacrificing helpful detail.

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 the tool's complexity (a search function with one parameter), lack of annotations, and no output schema, the description is incomplete. It doesn't explain what the search returns, how results are formatted, or any behavioral traits. For a tool that likely returns multiple items, more context is needed to guide effective use, making it inadequate for the agent's needs.

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?

The input schema has 100% description coverage, with the parameter 'key_word' clearly documented as searching memo content. The description 'Search for memos' aligns with this but adds no additional meaning beyond what the schema provides, such as syntax examples or search scope. With high schema coverage, a baseline score of 3 is appropriate, as the description doesn't compensate but doesn't detract either.

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' clearly states the verb (search) and resource (memos), making the purpose understandable. However, it lacks specificity about what aspects of memos are searched (e.g., content, titles) and doesn't differentiate from sibling tools like 'get_memo' or 'list_memo_tags', which might also retrieve memo information. This makes it vague in distinguishing its unique function.

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?

The description provides no guidance on when to use this tool versus alternatives. It doesn't mention scenarios like searching by content versus retrieving by ID (get_memo) or listing tags (list_memo_tags), nor does it specify prerequisites or exclusions. Without such context, an agent might struggle to choose the right tool among siblings.

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