Skip to main content
Glama
108yen
by 108yen

Get Memos

getMemos

Retrieve all stored memos from the local database for review or analysis.

Instructions

Get all memos

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
memosYes

Implementation Reference

  • MCP tool handler that invokes the repository getMemos function and returns formatted content and structured memos data.
    async () => {
      const memos = await getMemos()
      return {
        content: [{ text: JSON.stringify(memos), type: "text" }],
        structuredContent: { memos },
      }
    },
  • Zod schema for Memo type, used in the getMemos tool's outputSchema as z.array(MemoSchema). Defines structure and validation for memo objects.
    export const MemoSchema = z.object({
      categoryId: z.string().optional(),
      content: z.string(),
      createdAt: z
        .string()
        .datetime()
        .transform((date) => new Date(date))
        .describe(
          "The date when the memo was created. Display in ISO 8601 format, UTC+0 timezone.",
        ),
      id: z.string(),
      title: z.string(),
      updatedAt: z
        .string()
        .datetime()
        .transform((date) => new Date(date))
        .describe(
          "The date when the memo was last updated. Display in ISO 8601 format, UTC+0 timezone.",
        ),
    })
  • Registration of the 'getMemos' tool on the MCP server, including description, empty input schema, MemoSchema-based output schema, title, and inline handler.
    server.registerTool(
      "getMemos",
      {
        description: "Get all memos",
        inputSchema: {},
        outputSchema: { memos: z.array(MemoSchema) },
        title: "Get Memos",
      },
      async () => {
        const memos = await getMemos()
        return {
          content: [{ text: JSON.stringify(memos), type: "text" }],
          structuredContent: { memos },
        }
      },
    )
  • Repository utility function that reads the database and returns all memos. Invoked by the tool handler.
    export const getMemos = async () => {
      await db.read()
      return db.data.memos
    }
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. 'Get all memos' implies a read-only operation, but it doesn't specify whether this requires authentication, how many memos are returned, if there's pagination, rate limits, or what happens if no memos exist. For a tool with zero annotation coverage, this leaves significant gaps in understanding its behavior.

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

Conciseness5/5

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

The description 'Get all memos' is a single, efficient sentence that is front-loaded with the core action. It wastes no words and is appropriately sized for a simple tool, making it easy to parse quickly.

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

Completeness3/5

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

Given the tool's simplicity (0 parameters, output schema exists), the description is minimally adequate. However, with no annotations and siblings like 'searchMemos', it lacks context on when to use this tool versus alternatives. The output schema handles return values, but the description could better address behavioral aspects like scope or limitations.

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

Parameters4/5

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

The input schema has 0 parameters with 100% coverage, so the schema fully documents the absence of parameters. The description adds no parameter information, which is appropriate here. Baseline is 4 for 0 parameters, as there's nothing to compensate for, and the description doesn't contradict the schema.

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

Purpose4/5

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

The description 'Get all memos' clearly states the verb ('Get') and resource ('memos'), making the purpose immediately understandable. It distinguishes from siblings like 'getMemo' (singular) and 'searchMemos' (filtered search), though it doesn't explicitly mention these distinctions. The description avoids tautology by not just restating the name/title.

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 when to prefer 'getMemos' over 'getMemo' (for a single memo) or 'searchMemos' (for filtered results), nor does it specify any prerequisites or exclusions. Usage is implied by the name but not explained.

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/108yen/memo-mcp'

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