Get Memos
getMemosRetrieve all stored memos from the local database to review previously recorded information.
Instructions
Get all memos
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| memos | Yes |
Implementation Reference
- src/repository/memos.ts:20-23 (handler)The actual handler function that reads the database and returns all memos.
export const getMemos = async () => { await db.read() return db.data.memos } - src/server/tools.ts:46-61 (registration)The tool registration on the MCP server, mapping the name 'getMemos' to the 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 }, } }, ) - src/schemas/memos.ts:3-22 (schema)The MemoSchema (Zod) used as the output schema for the memos returned by getMemos.
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.", ), }) - src/server/tools.ts:3-10 (helper)Import of the getMemos handler from the repository layer into the tools registration file.
import { createCategory, deleteCategory, getCategories, getCategory, updateCategory, } from "../repository/categories" import {