Skip to main content
Glama

getMemos

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

Instructions

Get all memos

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

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 }

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