Skip to main content
Glama
108yen
by 108yen

Update Memo

updateMemo

Update an existing memo by specifying its ID and optionally changing its title, content, or category.

Instructions

Update a memo

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idYesThe ID of the memo
categoryIdNo
contentNo
titleNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
memoYes

Implementation Reference

  • Registration of the 'updateMemo' MCP tool on the server, defining its name, description, input/output schemas, and the async handler that delegates to the repository.
    server.registerTool(
      "updateMemo",
      {
        description: "Update a memo",
        inputSchema: {
          id: z.string().describe("The ID of the memo"),
          ...UpdateMemoSchema.shape,
        },
        outputSchema: { memo: MemoSchema },
        title: "Update Memo",
      },
      async ({ id, ...memo }) => {
        const updatedMemo = await updateMemo(id, memo)
        if (!updatedMemo) {
          return {
            content: [{ text: "Memo not found", type: "text" }],
            isError: true,
          }
        }
    
        return {
          content: [{ text: JSON.stringify(updatedMemo), type: "text" }],
          structuredContent: { memo: updatedMemo },
        }
      },
    )
  • Core handler function that updates a memo in the database by ID, merging new fields and setting updatedAt timestamp.
    export const updateMemo = async (id: string, memo: UpdateMemo) => {
      await db.read()
    
      const index = db.data.memos.findIndex((memo) => memo.id === id)
      if (index == -1) {
        return undefined
      }
    
      const existingMemo = db.data.memos[index]!
    
      const newMemo = {
        ...existingMemo,
        ...memo,
        updatedAt: new Date().toISOString(),
      }
      db.data.memos[index] = newMemo
      await db.write()
    
      return newMemo
    }
  • Zod schema defining the input shape for updating a memo: optional categoryId, optional content, and optional title.
    export const UpdateMemoSchema = z.object({
      categoryId: z.string().optional(),
      content: z.string().optional(),
      title: z.string().optional(),
    })
    
    export type UpdateMemo = z.infer<typeof UpdateMemoSchema>
Behavior2/5

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

With no annotations, the description carries full burden for behavioral transparency. It only states 'Update a memo' without disclosing any traits like side effects, idempotency, or required permissions. The output schema exists but is not described.

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

Conciseness2/5

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

The description is extremely concise at 3 words, but it is under-specified. It does not provide enough information to be useful, making it more of an omission than effective conciseness.

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 that there is an output schema and 4 parameters, the description should provide more context about return values and parameter roles. The current description is too minimal to be considered complete for an AI agent to use effectively.

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

Parameters2/5

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

The input schema has 4 parameters but only 'id' has a description. The description does not add any meaning to the parameters beyond what is already in the schema. It fails to explain what categoryId, content, or title do.

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 'Update a memo' clearly states the action and resource, distinguishing it from sibling create/delete tools. However, it does not differentiate from other update tools like updateCategory, though the name alone makes the resource clear.

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?

No guidance is provided on when to use this tool versus alternatives. There is no mention of prerequisites, context, or conditions for use, which limits the agent's ability to decide appropriately.

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