Skip to main content
Glama
108yen
by 108yen

Update Memo

updateMemo

Modify existing memos by updating their title, content, or category to keep information current and organized.

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

  • Core implementation of updateMemo: reads DB, finds memo by ID, merges updates, writes back, returns updated memo.
    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
    }
  • Registers the 'updateMemo' tool with the MCP server, defines input/output schemas, and provides the tool handler function.
    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 },
        }
      },
  • Zod schema defining the input shape for updating a memo (optional fields for title, content, categoryId).
    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?

No annotations are provided, so the description carries full burden for behavioral disclosure. 'Update a memo' implies a mutation operation but doesn't specify whether it requires permissions, what happens on success/failure, if changes are reversible, or any rate limits. For a write tool with zero annotation coverage, this is a significant gap in transparency.

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 just three words, front-loading the essential action. There is no wasted language or redundancy, making it efficient for quick scanning. However, this brevity comes at the cost of completeness.

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 the complexity of a mutation tool with 4 parameters, low schema coverage (25%), no annotations, and sibling tools present, the description is inadequate. While an output schema exists (which helps with return values), the description doesn't address key contextual aspects like usage differentiation, parameter semantics, or behavioral traits, leaving the agent under-informed.

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?

Schema description coverage is only 25% (only 'id' has a description), leaving three parameters undocumented. The description adds no information about parameters beyond what the schema provides—it doesn't explain what 'categoryId', 'content', or 'title' represent or their constraints. With low coverage and no compensation in the description, it fails to clarify parameter meanings.

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

Purpose2/5

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

The description 'Update a memo' is a tautology that merely restates the tool name 'updateMemo'. While it correctly identifies the verb ('update') and resource ('memo'), it provides no additional specificity about what aspects can be updated or how this differs from sibling tools like 'updateCategory'. It meets the minimum requirement of stating the action but lacks differentiation.

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 offers no guidance on when to use this tool versus alternatives. It doesn't mention prerequisites (e.g., needing an existing memo ID), when not to use it (e.g., for creating new memos), or refer to sibling tools like 'createMemo' or 'updateCategory'. The agent must infer usage from context alone.

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