Skip to main content
Glama
108yen
by 108yen

Get Memo

getMemo

Retrieve a specific memo from the memo-mcp server by providing its unique ID. This tool enables agents to access recorded information stored in the local database.

Instructions

Get a single memo by ID

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idYesThe ID of the memo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
memoYes

Implementation Reference

  • MCP tool handler for getMemo: calls repository getMemo(id), handles not found case with error response, otherwise returns text and structured content with the memo.
    async ({ id }) => {
      const memo = await getMemo(id)
      if (!memo) {
        return {
          content: [{ text: "Memo not found", type: "text" }],
          isError: true,
        }
      }
    
      return {
        content: [{ text: JSON.stringify(memo), type: "text" }],
        structuredContent: { memo },
      }
    },
  • MemoSchema: Zod schema defining the memo object structure (id, title, content, optional categoryId, createdAt/updatedAt as Date), used in getMemo outputSchema.
    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 getMemo tool using server.registerTool, specifying name, description, inputSchema (id: string), outputSchema ({memo: MemoSchema}), and title.
    server.registerTool(
      "getMemo",
      {
        description: "Get a single memo by ID",
        inputSchema: {
          id: z.string().describe("The ID of the memo"),
        },
        outputSchema: { memo: MemoSchema },
        title: "Get Memo",
      },
  • Repository helper function getMemo: reads the database and finds/returns the memo by matching id.
    export const getMemo = async (id: string) => {
      await db.read()
      return db.data.memos.find((memo) => memo.id === id)
    }
Behavior2/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure but offers minimal information. It doesn't mention whether this is a read-only operation, what happens if the ID doesn't exist (e.g., error handling), authentication requirements, or rate limits. The description is too basic for a tool with no annotation support.

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 is extremely concise with a single sentence that directly states the tool's function. It's front-loaded with the core purpose and contains no unnecessary words or redundant information, making it highly efficient.

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

Completeness4/5

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

Given the tool's low complexity (single parameter, read-like operation) and the presence of an output schema (which handles return values), the description is reasonably complete for its basic function. However, it could benefit from more behavioral context, especially since no annotations are provided to cover safety or operational details.

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 schema description coverage is 100%, with the 'id' parameter fully documented in the schema as 'The ID of the memo'. The description adds no additional meaning beyond this, such as format examples or constraints, so it meets the baseline score of 3 where the schema does the heavy lifting.

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 clearly states the tool's purpose with a specific verb ('Get') and resource ('a single memo by ID'), making it immediately understandable. However, it doesn't differentiate from sibling tools like 'getMemos' (plural) or 'getCategory', which could cause confusion about when to use this specific retrieval method versus others.

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 like 'getMemos' (for multiple memos) or 'searchMemos' (for filtered searches). It lacks explicit context about prerequisites, such as needing a specific memo ID, or exclusions for when other retrieval methods might be more appropriate.

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